Search code examples
nagiosganglia

Intergrating Nagios + Ganglia: UNKNOWN Hostname info not available. Likely invalid hostname


I'm trying to integrate Nagios and Ganglia using methods described here. While using the Ganglia Web Nagios script, check_heartbeat, in command line:

sh /var/www/html/ganglia/nagios/check_heartbeat.sh host=node-name threshold=50

Output: OK Last beacon received 0 days, 0:00:00

But in the Nagios UI, I'm getting the message as,

UNKNOWN x.x.x.x - Hostname info not available. Likely invalid hostname

I found some discussions based on the same issues in the following links

As I'm new to Ganglia and Nagios, they didn't give me the idea to solve the issue.


Solution

  • Instead of

    define command {
        command_name  check_ganglia_heartbeat
        command_line  /bin/sh /var/www/html/ganglia/nagios/check_heartbeat.sh host=$HOSTADDRESS$ threshold=$ARG1$
    }
    

    to

    define command {
        command_name  check_ganglia_heartbeat
        command_line  /bin/sh /var/www/html/ganglia/nagios/check_heartbeat.sh host=$HOSTNAME$ threshold=$ARG1$
    }
    

    I was able to solve this error.