-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from kuskoman/moreeeee-refactor
More refactor, 100% test coverage
- Loading branch information
Showing
12 changed files
with
66 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
package config | ||
|
||
var ( | ||
// LogstashUrl is the URL of the Logstash instance to be monitored. | ||
// Defaults to http://localhost:9600 | ||
// Can be overridden by setting the LOGSTASH_URL environment variable | ||
LogstashUrl = getEnvWithDefault("LOGSTASH_URL", "http://localhost:9600") | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
package config | ||
|
||
// PrometheusNamespace is the namespace used for all metrics exported by this exporter. | ||
const PrometheusNamespace = "logstash" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,17 @@ | ||
package config | ||
|
||
var ( | ||
// Port is the port the exporter will listen on. | ||
// Defaults to 9198 | ||
// Can be overridden by setting the PORT environment variable | ||
Port = getEnvWithDefault("PORT", "9198") | ||
|
||
// Host is the host the exporter will listen on. | ||
// Defaults to an empty string, which will listen on all interfaces | ||
// Can be overridden by setting the HOST environment variable | ||
// For windows, use "localhost", because an empty string will not work | ||
// with the default windows firewall configuration. | ||
// Alternatively you can change the firewall configuration to allow | ||
// connections to the port from all interfaces. | ||
Host = getEnvWithDefault("HOST", "") | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters