I'm trying to run a query which will draw back hostname, services
associated with that host, description of the service, service command
line and arguments for the command line.

This is to provide an audit of what we're monitoring for the business.

The below query seems to work fine for most hosts but a number of
services show their command line as
"/usr/local/nagios/bin/set_to_stale"

Why is this and what can I do to display the correct command line ?

Here's the query...

SELECT
nagios_hosts.display_name,
nagios_services.display_name,
nagios_services.notes,
nagios_commands.command_line,
nagios_services.check_command_args
FROM
nagios_hosts,
nagios_services,
nagios_commands
WHERE
nagios_hosts.host_object_id = nagios_services.host_object_id
AND
nagios_commands.object_id = nagios_services.check_command_object_id;

...and here is some correct output...

*************************** 944. row ***************************
      display_name: server01
      display_name: SSH
             notes: Network Services:Checks SSH on TCP port 22
      command_line: /usr/local/nagios/libexec/check_tcp $ARG1$
check_command_args: -H $HOSTADDRESS$ -p 22

...and seemingly incorrect output...

*************************** 981. row ***************************
      display_name: server02
      display_name: Disk Space
             notes: NRPE - Generic:Disk Space
      command_line: /usr/local/nagios/bin/set_to_stale
check_command_args:

Any ideas most welcome.

Thanks.
_______________________________________________
Opsview-users mailing list
[email protected]
http://lists.opsview.org/lists/listinfo/opsview-users

Reply via email to