Announcement

Collapse
No announcement yet.

Nagios Plugin for to check service statuses of linux

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Nagios Plugin for to check service statuses of linux

    Hi All,

    I need to check service statuses of linux from Nagios Monitoring tool.

    Is there any plugin to check service statuses of linux?

    I wrote one shell script for this:

    #!/bin/sh
    host="$1"
    service="$2"
    t=`/etc/init.d/$service status`
    if echo "$t" |grep -q running; then
    echo "OK - $service service is running."
    exit 0
    else
    echo "Critical - $service service is stopped."
    exit 2
    fi

    But it is working from terminal. But it is not working from nagios. Actually for example `/etc/init.d/acpid status` is not executing when nagios calling.

    how do I make it to execute correct? or Is there any way to get needed result?

    Please help!

  • #2
    look at "sudo" for this problem
    Intel(R) Xeon(TM) CPU 3.4GHz - MemTotal : 1034476 kB
    Centreon 2.4.1 - Nagios 3.2.1 - Nagios Plugins 1.4.15 - Manubulon Plugins tuné
    Fedora Core 5 - 2.6.20-1.2320

    Comment

    Working...
    X