Moving from Check_NT to Check_NRPE

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.
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

Moving from Check_NT to Check_NRPE

Post by kwhogster »

In preparation for upgrading my NSCLIENTs to new version I read that check_nt is going to be phased out they are only holding on for legacy. So I am rebuilding my configs and I is a good time to make the change to check_nrpe.

I have this check I need help with converting so far.

Code: Select all

define service{
        use                     generic-service
        host_name               TGCS011
        service_description     Explorer
        servicegroups           explorer
        check_command           check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
        }
Did some research and cant seem to find anything.

Working on the others now

Thanks

Tom
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Moving from Check_NT to Check_NRPE

Post by rkennedy »

You should be able to use check_procs

Code: Select all

[root@xi libexec]# ./check_procs -C httpd
PROCS OK: 11 processes with command name 'httpd' | procs=11;;;0;
This guide will help - http://linuxsysadminblog.com/2009/02/na ... s-running/
Former Nagios Employee
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

Re: Moving from Check_NT to Check_NRPE

Post by kwhogster »

rkennedy

thanks

I found this here helpful too

http://sites.box293.com/nagios/guides/c ... ing-system
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

Re: Moving from Check_NT to Check_NRPE

Post by kwhogster »

Rkennedy

One I cant find is a replacement for this one too

Code: Select all

define service{
        use                     generic-service
        host_name               TGCS011
        service_description     NSClient++ Version
        servicegroups           nsclients
        check_command           check_nt!CLIENTVERSION
        }
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Moving from Check_NT to Check_NRPE

Post by rkennedy »

Yeah - there are a lot of useful ones on Troy's site.

For the check_nt version, this shouldn't matter since you won't be using the check_nt protocol. running simply check_nrpe without any command arguments should come back with the NRPE version.
Former Nagios Employee
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

Re: Moving from Check_NT to Check_NRPE

Post by kwhogster »

Do you have an example of what I can use to check the nsclient version
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Moving from Check_NT to Check_NRPE

Post by mcapra »

Like so:

Code: Select all

[root@xi-stable archives]# /usr/local/nagios/libexec/check_nrpe -H 192.168.67.99
I (0.4.3.143 2015-04-29) seem to be doing fine...
Former Nagios employee
https://www.mcapra.com/
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

Re: Moving from Check_NT to Check_NRPE

Post by kwhogster »

mcapra

[root@xi-stable archives]# /usr/local/nagios/libexec/check_nrpe -H 192.168.67.99
I (0.4.3.143 2015-04-29) seem to be doing fine...

That only checks the host what about nsclient process
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

Re: Moving from Check_NT to Check_NRPE

Post by kwhogster »

Guys

I made the changes and not getting any where


My commands

Code: Select all

define command{
        command_name    check_uptime
        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -t 60 -c CheckUpTime -a MaxCrit=90d
}

define command{
        command_name    cpu_load
        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -t 60 -c CheckCPU -a warn=80 crit=90 time=1m time=5m time=15m
}

define command{
        command_name    mem_check
        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -t 60 -c CheckMEM -a warn=80 crit=90 time=1m time=5m time=15m
}

define command{
        command_name    check_servicestate
        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -t 60 -c CheckServiceState -a ShowAll=$ARG1$

}

define command{
        command_name    check_explorer
        command_line    $USER1$/usr/local/nagios/libexec/check_procs -c 1:30 -C explorer

}
My services

Code: Select all

define service{
        use                     generic-service
        host_name               TGCS011
        service_description     Uptime
        check_command           check_nrpe!check_uptime
        }
define service{
        use                     generic-service
        host_name               TGCS011
        service_description     CPU Load
        servicegroups           CPULoad
        check_command           check_nrpe!cpu_load
        }
define service{
        use                     generic-service
        host_name               TGCS011
        service_description     Memory Usage
        servicegroups           MemUsage
        check_command           check_nrpe!mem_check
        }
define service{
        use                     generic-service
        host_name               TGCS011
        service_description     W3SVC
        servicegroups           WEBServices
        check_command           check_nrpe!check_servicestate! W3SVC
        }
define service{
        use                     generic-service
        host_name               TGCS011
        service_description     Explorer
        servicegroups           explorer
        check_command           check_nrpe!check_explorer
        }
This is my test machine once I get the check_nrpe commands set then I can modify the others.

In Nagios I get these as unknowns


TGCS011 Notifications for this host have been disabled
CPU Load Notifications for this service have been disabled UNKNOWN 02-17-2017 21:06:04 0d 0h 37m 26s 3/3 No handler for command: cpu_load
Explorer Notifications for this service have been disabled UNKNOWN 02-17-2017 21:07:49 0d 0h 37m 41s 3/3 No handler for command: check_explorer
Memory Usage Notifications for this service have been disabled UNKNOWN 02-17-2017 21:07:59 0d 0h 37m 31s 3/3 No handler for command: mem_check
Uptime Notifications for this service have been disabled UNKNOWN 02-17-2017 21:08:03 0d 0h 37m 22s 3/3 ERROR: Missing argument exception.
W3SVC Notifications for this service have been disabled UNKNOWN 02-17-2017 21:08:03 0d 0h 37m 27s 3/3 No handler for command: check_servicestate

When I run these from command line they all work


root@tgcs017:/usr/local/nagios/etc/objects# /usr/lib/nagios/plugins/check_nrpe -H TGCS011 -t 30 -c CheckUpTime -a MaxCrit=90d
OK all counters within bounds.|'uptime'=5445810000;0;7776000000

root@tgcs017:/usr/local/nagios/etc/objects# /usr/lib/nagios/plugins/check_nrpe -H TGCS011 -t 30 -c CheckCPU -a warn=80 crit=90 time=1m time=5m time=15m
OK CPU Load ok.|'1m'=0%;80;90 '5m'=1%;80;90 '15m'=1%;80;90

root@tgcs017:/usr/local/nagios/etc/objects# /usr/lib/nagios/plugins/check_nrpe -H TGCS011 -t 30 -c CheckMEM -a ShowAll=long type=physical MinWarn=20% MinCrit=10%
OK: physical memory: Total: 4G - Used: 2.01G (50%) - Free: 1.99G (50%)|'physical memory %'=50%;20;10 'physical memory'=2061.89M;819.07;409.53;0;4095.36

root@tgcs017:/usr/local/nagios/etc/objects# /usr/lib/nagios/plugins/check_nrpe -H TGCS011 -t 30 -c CheckServiceState -a Showall=W3SVC
OK: All services are in their appropriate state.



Any ideas

Thanks
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

Re: Moving from Check_NT to Check_NRPE

Post by kwhogster »

Guys.

My last post can be ignored.

I worked them out.

Still looking for a check_nrpe that will work for checking the explorer.exe process is running or not. Have not had any luck with the plugins on the site yet.

I also posted on the NSCLIENT Site hoping for a response none as of yet.

Any ideas
Locked