blog:display_nagios_status_on_the_desktop_using_conky
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
blog:display_nagios_status_on_the_desktop_using_conky [2010-06-23 08:29] – brb | blog:display_nagios_status_on_the_desktop_using_conky [2010-06-23 08:31] – brb | ||
---|---|---|---|
Line 7: | Line 7: | ||
* add the call to nagiosmon in your .conkyrc file:\\ '' | * add the call to nagiosmon in your .conkyrc file:\\ '' | ||
- | < | + | [[:blogfiles:nagiosmon.sh]] |
- | <code bash> | + | |
- | + | ||
- | # | + | |
- | # | + | |
- | # Written by Dieter Plaetinck | + | |
- | # Updated by Bernhard Brunner: output for conky | + | |
- | # | + | |
- | # Licensed under the GPL V3 | + | |
- | # See gnu.org/ | + | |
- | # | + | |
- | # works for Nagios 2.x or nagios 3.x | + | |
- | URL=http:// | + | |
- | USERNAME=nagiosadmin | + | |
- | PASSWORD=< | + | |
- | + | ||
- | PAGE=$(curl -s -k -u $USERNAME: | + | |
- | #echo $PAGE | + | |
- | + | ||
- | HOSTS_DOWN=$( echo -e " | + | |
- | HOSTS_UNREACHABLE=$( echo -e " | + | |
- | HOSTS_UP=$( echo -e " | + | |
- | HOSTS_PENDING=$( echo -e " | + | |
- | + | ||
- | SERVICES_CRIT=$( echo -e " | + | |
- | SERVICES_WARN=$( echo -e " | + | |
- | SERVICES_UNKNOWN=$( echo -e " | + | |
- | SERVICES_OK=$( echo -e " | + | |
- | SERVICES_PENDING=$( echo -e " | + | |
- | + | ||
- | if [[ " | + | |
- | then | + | |
- | echo ' | + | |
- | else | + | |
- | if [[ $(($HOSTS_DOWN + $SERVICES_CRIT)) > 0 ]] | + | |
- | then | + | |
- | echo ' | + | |
- | else | + | |
- | if [[ $SERVICES_WARN > 0 ]] | + | |
- | then | + | |
- | echo ' | + | |
- | else | + | |
- | echo ' | + | |
- | fi | + | |
- | fi | + | |
- | fi | + | |
- | + | ||
- | </ | + | |
Ref: | Ref: |
blog/display_nagios_status_on_the_desktop_using_conky.txt · Last modified: 2010-06-23 08:34 by brb