Check DB instance
Re: Check DB instance
The reason you were not notified is because you copied the localhost checks, which run on the Nagios server itself. You need to run remote checks through something like NRPE: https://assets.nagios.com/downloads/nag ... g_NRPE.pdf
Former Nagios employee
-
donnyforbes
- Posts: 357
- Joined: Tue Jun 13, 2017 2:17 pm
Re: Check DB instance
I just saw that.. I will look into this. Thanks
-
donnyforbes
- Posts: 357
- Joined: Tue Jun 13, 2017 2:17 pm
Re: Check DB instance
I believe I already have nrpe installed on the remote host. Did that durning the install the linux agent ./fullinstallThe reason you were not notified is because you copied the localhost checks, which run on the Nagios server itself. You need to run remote checks through something like NRPE: https://assets.nagios.com/downloads/nag ... g_NRPE.pdf
Do I edit the service for the hosts and then click on Managed Templetes? Which templete would I select. I know it had localhost .
-
donnyforbes
- Posts: 357
- Joined: Tue Jun 13, 2017 2:17 pm
Re: Check DB instance
See this screenshot. I believe I have the NRPE installed if not i will install it. See below and let me know
You do not have the required permissions to view the files attached to this post.
-
donnyforbes
- Posts: 357
- Joined: Tue Jun 13, 2017 2:17 pm
Re: Check DB instance
I already installed this see below ..
Code: Select all
[root@duey linux-nrpe-agent]# pwd
/tmp/linux-nrpe-agent
[root@duey linux-nrpe-agent]# ls
0-repos 3-services CHANGES.txt init.sh installed.repos installed.usersgroups packages xi-sys.cfg
1-prereqs 4-firewall fullinstall installed.firewall installed.services install.log subcomponents xivar
2-usersgroups A-subcomponents get-os-info installed.prereqs installed.subcomponents nagios.firewallapps xinrpe
[root@duey linux-nrpe-agent]#
-
donnyforbes
- Posts: 357
- Joined: Tue Jun 13, 2017 2:17 pm
Re: Check DB instance
Since this is already installed I believe I need to change the service for duey "Service Status - httpd" manage templete to something else.The reason you were not notified is because you copied the localhost checks, which run on the Nagios server itself. You need to run remote checks through something like NRPE: https://assets.nagios.com/downloads/nag ... g_NRPE.pdf
Should I change it to this to "xiwizard_nrpe_service" If not what do I change it to? Please advise.
-
donnyforbes
- Posts: 357
- Joined: Tue Jun 13, 2017 2:17 pm
Re: Check DB instance
That did not work. When I run the "Run Check Command" the output is the nagios server not the remote see below. I need it on the duey server which is a remote hosts
Code: Select all
nagios@nag ~]$ sudo /usr/local/nagiosxi/scripts/manage_services.sh status httpd
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2017-06-28 08:11:14 PDT; 7h ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 63314 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=0/SUCCESS)
Process: 46782 ExecReload=/usr/sbin/httpd $OPTIONS -k graceful (code=exited, status=0/SUCCESS)
Main PID: 63327 (httpd)
Status: "Total requests: 6646; Current requests/sec: 0.2; Current traffic: 307 B/sec"
CGroup: /system.slice/httpd.service
├─ 2824 /usr/sbin/httpd -DFOREGROUND
├─ 2826 /usr/sbin/httpd -DFOREGROUND
├─12879 /usr/sbin/httpd -DFOREGROUND
├─15365 /usr/sbin/httpd -DFOREGROUND
├─17856 /usr/sbin/httpd -DFOREGROUND
├─22316 /usr/sbin/httpd -DFOREGROUND
├─23348 /usr/sbin/httpd -DFOREGROUND
├─61134 /usr/sbin/httpd -DFOREGROUND
├─61135 /usr/sbin/httpd -DFOREGROUND
├─63327 /usr/sbin/httpd -DFOREGROUND
└─63334 /usr/sbin/httpd -DFOREGROUND
Jun 28 08:11:13 nag systemd[1]: Starting The Apache HTTP Server...
Jun 28 08:11:14 nag systemd[1]: Started The Apache HTTP Server.-
donnyforbes
- Posts: 357
- Joined: Tue Jun 13, 2017 2:17 pm
Re: Check DB instance
Here is what I did... I change the check command to ->
check_nrpe
$USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$
$ARG1$ httpd
Then ran the "Run check command" put the ip_address in of the remote server see below.
Run Check Command
Host Address: 192.168.1.43
Run Check Command
[nagios@nag ~]$ /usr/local/nagios/libexec/check_nrpe -H 192.168.1.43 -t 30 -c httpd
NRPE: Command 'httpd' not defined
Is this how I get this to work?
check_nrpe
$USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$
$ARG1$ httpd
Then ran the "Run check command" put the ip_address in of the remote server see below.
Run Check Command
Host Address: 192.168.1.43
Run Check Command
[nagios@nag ~]$ /usr/local/nagios/libexec/check_nrpe -H 192.168.1.43 -t 30 -c httpd
NRPE: Command 'httpd' not defined
Is this how I get this to work?
-
donnyforbes
- Posts: 357
- Joined: Tue Jun 13, 2017 2:17 pm
Re: Check DB instance
Got it to work see below
***** Nagios XI Alert *****
Nagios has detected a problem with this service.
Notification Type: PROBLEM
Service: Service Status - httpd - Infx_OAT
Host: duey.sg1.allamericanasphalt.com
Address: 192.168.1.43
State: CRITICAL
Info:
NRPE: Command httpd not defined
Date/Time: 2017-06-28 16:10:24
***** Nagios XI Alert *****
Nagios has detected a problem with this service.
Notification Type: PROBLEM
Service: Service Status - httpd - Infx_OAT
Host: duey.sg1.allamericanasphalt.com
Address: 192.168.1.43
State: CRITICAL
Info:
NRPE: Command httpd not defined
Date/Time: 2017-06-28 16:10:24
-
donnyforbes
- Posts: 357
- Joined: Tue Jun 13, 2017 2:17 pm
Re: Check DB instance
go ahead and locked this ticket.