Moving from Check_NT to Check_NRPE

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Moving from Check_NT to Check_NRPE

Postby kwhogster » Tue Feb 14, 2017 9:52 pm

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

Re: Moving from Check_NT to Check_NRPE

Postby rkennedy » Wed Feb 15, 2017 10:36 am

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/
rkennedy
 
Posts: 6562
Joined: Mon Oct 05, 2015 11:45 am

Re: Moving from Check_NT to Check_NRPE

Postby kwhogster » Wed Feb 15, 2017 7:51 pm

rkennedy

thanks

I found this here helpful too

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

Re: Moving from Check_NT to Check_NRPE

Postby kwhogster » Wed Feb 15, 2017 8:43 pm

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

Re: Moving from Check_NT to Check_NRPE

Postby rkennedy » Thu Feb 16, 2017 10:16 am

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.
rkennedy
 
Posts: 6562
Joined: Mon Oct 05, 2015 11:45 am

Re: Moving from Check_NT to Check_NRPE

Postby kwhogster » Thu Feb 16, 2017 9:51 pm

Do you have an example of what I can use to check the nsclient version
kwhogster
 
Posts: 383
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA

Re: Moving from Check_NT to Check_NRPE

Postby mcapra » Fri Feb 17, 2017 2:58 pm

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
http://www.mcapra.com/
User avatar
mcapra
 
Posts: 2684
Joined: Thu May 05, 2016 3:54 pm

Re: Moving from Check_NT to Check_NRPE

Postby kwhogster » Fri Feb 17, 2017 7:56 pm

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: 383
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA

Re: Moving from Check_NT to Check_NRPE

Postby kwhogster » Fri Feb 17, 2017 9:38 pm

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: 383
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA

Re: Moving from Check_NT to Check_NRPE

Postby kwhogster » Sat Feb 18, 2017 3:57 pm

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

Next

Return to Nagios Core

Who is online

Users browsing this forum: No registered users and 7 guests