Create nagios scripts and not showing on web interfaces

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
pianunix
Posts: 51
Joined: Tue Jul 22, 2014 3:08 am

Create nagios scripts and not showing on web interfaces

Post by pianunix »

Hi,

Today i have created my own bash scripts and adding this into nagios monitoring, but some how this result wont show up in nagios web interfaces, but when i execute the scripts was running with successfull.

Code: Select all

:~# /usr/lib/nagios/plugins/check_nrpe -H server45026x -c usedspace_bash
OK - 33% of disk space used.
Can anyone know how to solve this problem ?

Thanks
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Create nagios scripts and not showing on web interfaces

Post by tmcdonald »

pianunix wrote:but some how this result wont show up in nagios web interfaces, but when i execute the scripts was running with successfull.
What do you mean by this? Did you create a service definition for it? If not, it will neither be visible nor running. If you do have configs please post them.
Former Nagios employee
pianunix
Posts: 51
Joined: Tue Jul 22, 2014 3:08 am

Re: Create nagios scripts and not showing on web interfaces

Post by pianunix »

Service description already added, but still wont show on the web interfaces

file.cfg

Code: Select all

define service {
        use                             generic-service
        host_name                      xxxxxxxxxxxxxxxxx
        service_description             Custom Disk
        check_command                   check_nrpe_1arg!usedspace_bash
        }
and sorry the hostname i change it.

command.cfg

Code: Select all

define command{
        command_name    usedspace_bash
        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c usedspace_bash
        }
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Create nagios scripts and not showing on web interfaces

Post by ssax »

Looks like you need to modify your service check_command:

Code: Select all

    define service {
            use                             generic-service
            host_name                       xxxxxxxxxxxxxxxxx
            service_description             Custom Disk
            check_command                   usedspace_bash
            }
pianunix
Posts: 51
Joined: Tue Jul 22, 2014 3:08 am

Re: Create nagios scripts and not showing on web interfaces

Post by pianunix »

This problem has been fixed, and the solution fixed the command.cfg because they has the same command at usedspace_bash.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Create nagios scripts and not showing on web interfaces

Post by ssax »

I'm glad that helped you out, I'll be marking the ticket as resolved and locking the ticket now.
Locked