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 revision | ||
blog:display_nagios_status_on_the_desktop_using_conky [2010-06-23 08:17] – brb | blog:display_nagios_status_on_the_desktop_using_conky [2010-06-23 08:34] (current) – brb | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Display nagios status on the desktop using conky ====== | ====== Display nagios status on the desktop using conky ====== | ||
- | Conky is a lightweight system monitor which displays arbitrary information on the linux desktop. I wanted to display the nagios status not only in the firefox browser (using the recommended! | + | Conky is a lightweight system monitor which displays arbitrary information on the linux desktop. I wanted to display the nagios status not only in the firefox browser (using the " |
How to use it: | How to use it: | ||
- | * copy-paste the code below into a script | + | * copy-paste the [[: |
* add the call to nagiosmon in your .conkyrc file:\\ '' | * add the call to nagiosmon in your .conkyrc file:\\ '' | ||
- | <code bash> | ||
- | #!/bin/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: | + | Ref: http:// |
- | #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: | + | |
- | * http:// | + | |
blog/display_nagios_status_on_the_desktop_using_conky.1277273876.txt.gz · Last modified: 2010-06-23 08:17 by brb