Skip to content
This repository was archived by the owner on Dec 18, 2019. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions check_graphite_data
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ def main(argv):

if hw:
graphite_data, graphite_lower, graphite_upper = get_hw_value(url, seconds)
print 'Current value: %s, lower band: %s, upper band: %s' % \
(graphite_data, graphite_lower, graphite_upper)
print 'Current value: %s, lower band: %s, upper band: %s, url: %s' % \
(graphite_data, graphite_lower, graphite_upper, url)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not currently using nagios, but doesn't the UI allow you to view the command used to run a check, and thus would include the URL? I feel like this adds visual clutter that isn't necessarily useful for everyone who uses this script, so I'd be more inclined to sign off on the change if the display of the URL were optional. (Mind you, I don't think I have commit grants on master, so I'm not sure how much my opinion matters here 😄 )

if (graphite_data > graphite_upper) or (graphite_data < graphite_lower):
if critupper or critlower:
sys.exit(STATE_CRITICAL)
Expand All @@ -181,8 +181,8 @@ def main(argv):
graphite_data = get_value(url, seconds)
graphite_data *= scale

print 'Current value: %s, warn threshold: %s, crit threshold: %s' % \
(graphite_data, warn, crit)
print 'Current value: %s, warn threshold: %s, crit threshold: %s, url: %s' % \
(graphite_data, warn, crit, url)
if reverse == True:
if crit >= graphite_data:
sys.exit(STATE_CRITICAL)
Expand Down