Add Nagios 3.2.3 server to Nagios xi configuration
-
- Posts: 22
- Joined: Fri Apr 09, 2021 6:22 am
Re: Add Nagios 3.2.3 server to Nagios xi configuration
Still a little issue.
In the nagios log I can see this:
Warning: OCSP command '/usr/local/nagios/libexec/send_nrdp.sh -u https://10.5.8.x/nrdp/ -t XXXX -H "s91193" -s "Switch Uptime" -S 0 -o "Timeticks: (908009784) 105 days, 2:14:57.84"' for service 'Switch Uptime' on host 's91193' timed out after 5 seconds
if I try the exact command on the CLI, I get this:
nagios:~ # /usr/local/nagios/libexec/send_nrdp.sh -u https://10.5.8.x/nrdp/ -t XXXX -H "s91193" -s "Switch Uptime" -S 0 -o "Timeticks: (908009784) 105 days, 2:14:57.84"
Sent 1 checks to https://10.5.8.x/nrdp/
and I can see the host/check in the xi server as unconfigured objects.
To see if it's a permissions thing, I just changed ownership of the bash script to the nagios user (was set to root for group and owner).
Now waiting for a check to trigger this.
btw, is it normal I only see one or two of these commands in a day? I was actually expecting to see this at every check.
In the nagios log I can see this:
Warning: OCSP command '/usr/local/nagios/libexec/send_nrdp.sh -u https://10.5.8.x/nrdp/ -t XXXX -H "s91193" -s "Switch Uptime" -S 0 -o "Timeticks: (908009784) 105 days, 2:14:57.84"' for service 'Switch Uptime' on host 's91193' timed out after 5 seconds
if I try the exact command on the CLI, I get this:
nagios:~ # /usr/local/nagios/libexec/send_nrdp.sh -u https://10.5.8.x/nrdp/ -t XXXX -H "s91193" -s "Switch Uptime" -S 0 -o "Timeticks: (908009784) 105 days, 2:14:57.84"
Sent 1 checks to https://10.5.8.x/nrdp/
and I can see the host/check in the xi server as unconfigured objects.
To see if it's a permissions thing, I just changed ownership of the bash script to the nagios user (was set to root for group and owner).
Now waiting for a check to trigger this.
btw, is it normal I only see one or two of these commands in a day? I was actually expecting to see this at every check.
-
- Madmin
- Posts: 9190
- Joined: Thu Oct 30, 2014 9:02 am
Re: Add Nagios 3.2.3 server to Nagios xi configuration
The script is supposed to run after every Host or Service check. Make sure you have all of the settings enables in the nagios.cfg file and that the script is set to executable for the owner and group.
Make sure you did not disable obsess for the Hosts and Services directly and in any template they use.
You may need to increase the timeout for Obsessive Compulsive Hosts and Services.
Make sure you did not disable obsess for the Hosts and Services directly and in any template they use.
You may need to increase the timeout for Obsessive Compulsive Hosts and Services.
Thank you.Obsessive Compulsive Service Processor Timeout
Format: ocsp_timeout=<seconds>
Example: ocsp_timeout=5
Obsessive Compulsive Host Processor Timeout
Format: ochp_timeout=<seconds>
Example: ochp_timeout=5
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 22
- Joined: Fri Apr 09, 2021 6:22 am
Re: Add Nagios 3.2.3 server to Nagios xi configuration
I can't seem to get it working. Like mentioned yesterday, I see about 1 entry a day about nrdp in the log. That's a timeout warning. No other entries can be found.
I checked the settings through both the config files and the gui, I can't find anything that's disabled, all obsess over services and hosts are at 1, in the GUI they're also enabled (green), still, it's not sending out the data, though when I run the command manually on the core server, it runs fine.
I'm a bit lost to what I'm missing.
I checked the settings through both the config files and the gui, I can't find anything that's disabled, all obsess over services and hosts are at 1, in the GUI they're also enabled (green), still, it's not sending out the data, though when I run the command manually on the core server, it runs fine.
I'm a bit lost to what I'm missing.
-
- Madmin
- Posts: 9190
- Joined: Thu Oct 30, 2014 9:02 am
Re: Add Nagios 3.2.3 server to Nagios xi configuration
Try enabling debugging in Nagios and check the nagios.debug file for any errors when it tries to run the script.
I would start with the following settings.
Restart nagios and check the debug log.
Format: debug_file=<file_name>
Example: debug_file=/usr/local/nagios/var/nagios.debug
Debug Level
Format: debug_level=<#>
Example: debug_level=24
This option determines what type of information Nagios should write to the debug_file. This value is a logical OR of the values below.
-1 = Log everything
0 = Log nothing (default)
1 = Function enter/exit information
2 = Config information
4 = Process information
8 = Scheduled event information
16 = Host/service check information
32 = Notification information
64 = Event broker information
Format: debug_verbosity=<#>
Example: debug_verbosity=1
This option determines how much debugging information Nagios should write to the debug_file.
0 = Basic information
1 = More detailed information (default)
2 = Highly detailed information
I would start with the following settings.
Code: Select all
debug_verbosity=1
debug_level=64
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 22
- Joined: Fri Apr 09, 2021 6:22 am
Re: Add Nagios 3.2.3 server to Nagios xi configuration
So, I checked the debug log, and it seems that part is working. Snippet from that:
[1636359780.700003] [2048.2] [pid=16917] Just finished macro. Running output (42): '/nagios/startservice.php?Hostname=sqlsrv02'
[1636359780.700007] [2048.2] [pid=16917] Processing part: '&Dienst=SQLSERVERAGENT'
[1636359780.700010] [2048.2] [pid=16917] Not currently in macro. Running output (64): '/nagios/startservice.php?Hostname=sqlsrv02&Dienst=SQLSERVERAGENT'
[1636359780.700014] [2048.1] [pid=16917] Done. Final output: '/nagios/startservice.php?Hostname=sqlsrv02&Dienst=SQLSERVERAGENT'
[1636359780.700018] [2048.1] [pid=16917] **** END MACRO PROCESSING *************
[1636359780.700027] [001.0] [pid=16917] process_macros()
[1636359780.700530] [001.0] [pid=16917] process_macros()
[1636359780.700547] [001.0] [pid=16917] process_macros()
[1636359780.700558] [001.0] [pid=16917] process_macros()
[1636359780.871817] [256.1] [pid=10816] Execution time=0.172 sec, early timeout=0, result=0, output=Sent 1 checks to https://10.5.8.x/nrdp/
My "unconfigured objects" remain empty. copied command directly from debug log to command line and ran it, showed up fine on the xi machine.
Ran tcpdump again on the xi machine, it received 11604 packets in a few minutes, so data is being received.
I already restarted the xi machine to see if that makes any difference, but unfortunately, no.
Added the core.cap to this message (as core.txt since I'm not allowed to upload .cap files).
[1636359780.700003] [2048.2] [pid=16917] Just finished macro. Running output (42): '/nagios/startservice.php?Hostname=sqlsrv02'
[1636359780.700007] [2048.2] [pid=16917] Processing part: '&Dienst=SQLSERVERAGENT'
[1636359780.700010] [2048.2] [pid=16917] Not currently in macro. Running output (64): '/nagios/startservice.php?Hostname=sqlsrv02&Dienst=SQLSERVERAGENT'
[1636359780.700014] [2048.1] [pid=16917] Done. Final output: '/nagios/startservice.php?Hostname=sqlsrv02&Dienst=SQLSERVERAGENT'
[1636359780.700018] [2048.1] [pid=16917] **** END MACRO PROCESSING *************
[1636359780.700027] [001.0] [pid=16917] process_macros()
[1636359780.700530] [001.0] [pid=16917] process_macros()
[1636359780.700547] [001.0] [pid=16917] process_macros()
[1636359780.700558] [001.0] [pid=16917] process_macros()
[1636359780.871817] [256.1] [pid=10816] Execution time=0.172 sec, early timeout=0, result=0, output=Sent 1 checks to https://10.5.8.x/nrdp/
My "unconfigured objects" remain empty. copied command directly from debug log to command line and ran it, showed up fine on the xi machine.
Ran tcpdump again on the xi machine, it received 11604 packets in a few minutes, so data is being received.
I already restarted the xi machine to see if that makes any difference, but unfortunately, no.
Added the core.cap to this message (as core.txt since I'm not allowed to upload .cap files).
You do not have the required permissions to view the files attached to this post.
-
- Madmin
- Posts: 9190
- Joined: Thu Oct 30, 2014 9:02 am
Re: Add Nagios 3.2.3 server to Nagios xi configuration
This message
Can you post how the commands are defined so I can view them?
One suggestion is if you are using double quotes around the macros, use single quotes instead.
That should help in passing the data to the send_nrdp.sh script if there are and special characters in them.
If the data is not formatted right, the xi server will reject it and that is what I think is happening.
Thank you.
Could be an issue on how the command in defined in the Nagios 3.2.3 system. A cause of this error is when processing macros is they have special characters in them.Not currently in macro.
Can you post how the commands are defined so I can view them?
One suggestion is if you are using double quotes around the macros, use single quotes instead.
That should help in passing the data to the send_nrdp.sh script if there are and special characters in them.
If the data is not formatted right, the xi server will reject it and that is what I think is happening.
Thank you.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 22
- Joined: Fri Apr 09, 2021 6:22 am
Re: Add Nagios 3.2.3 server to Nagios xi configuration
From the debug log:
[1636387730.259054] [2048.1] [pid=10816] Done. Final output: '/usr/local/nagios/libexec/send_nrdp.sh -u https://10.5.8.x/nrdp/ -t XXXX -H "sqlsrv01" -s "Memory Usage" -S 0 -o "Memory usage: total:98302.09 Mb - used: 54664.65 Mb (56%) - free: 43637.44 Mb (44%)"'
[1636387730.259058] [2048.1] [pid=10816] **** END MACRO PROCESSING *************
[1636387730.259062] [016.2] [pid=10816] Processed obsessive compulsive service processor command line: /usr/local/nagios/libexec/send_nrdp.sh -u https://10.5.8.x/nrdp/ -t XXXX -H "sqlsrv01" -s "Memory Usage" -S 0 -o "Memory usage: total:98302.09 Mb - used: 54664.65 Mb (56%) - free: 43637.44 Mb (44%)"
[1636387730.259073] [001.0] [pid=10816] my_system()
[1636387730.259077] [256.1] [pid=10816] Running command '/usr/local/nagios/libexec/send_nrdp.sh -u https://10.5.8.x/nrdp/ -t XXXX -H "sqlsrv01" -s "Memory Usage" -S 0 -o "Memory usage: total:98302.09 Mb - used: 54664.65 Mb (56%) - free: 43637.44 Mb (44%)"'...
[1636387730.259086] [064.1] [pid=10816] Making callbacks (type 10)...
[1636387730.260085] [001.0] [pid=14846] process_macros()
[1636387730.462615] [256.1] [pid=10816] Execution time=0.203 sec, early timeout=0, result=0, output=Sent 1 checks to https://10.5.8.x/nrdp/
That seems fine.
Nagios.cfg:
obsess_over_services=1
ocsp_command=send_nrdp_service
obsess_over_hosts=1
ochp_command=send_nrdp_host
commands.cfg:
define command{
command_name send_nrdp_host
command_line $USER1$/send_nrdp.sh -u https://10.5.8.x/nrdp/ -t XXXX -H "$HOSTNAME$" -s $HOSTSTATEID$ -o "$HOSTOUTPUT$"
}
define command{
command_name send_nrdp_service
command_line $USER1$/send_nrdp.sh -u https://10.5.8.x/nrdp/ -t XXXX -H "$HOSTNAME$" -s "$SERVICEDESC$" -S $SERVICESTATEID$ -o "$SERVICEOUTPUT$"
}
(Am I missing smething?)
[1636387730.259054] [2048.1] [pid=10816] Done. Final output: '/usr/local/nagios/libexec/send_nrdp.sh -u https://10.5.8.x/nrdp/ -t XXXX -H "sqlsrv01" -s "Memory Usage" -S 0 -o "Memory usage: total:98302.09 Mb - used: 54664.65 Mb (56%) - free: 43637.44 Mb (44%)"'
[1636387730.259058] [2048.1] [pid=10816] **** END MACRO PROCESSING *************
[1636387730.259062] [016.2] [pid=10816] Processed obsessive compulsive service processor command line: /usr/local/nagios/libexec/send_nrdp.sh -u https://10.5.8.x/nrdp/ -t XXXX -H "sqlsrv01" -s "Memory Usage" -S 0 -o "Memory usage: total:98302.09 Mb - used: 54664.65 Mb (56%) - free: 43637.44 Mb (44%)"
[1636387730.259073] [001.0] [pid=10816] my_system()
[1636387730.259077] [256.1] [pid=10816] Running command '/usr/local/nagios/libexec/send_nrdp.sh -u https://10.5.8.x/nrdp/ -t XXXX -H "sqlsrv01" -s "Memory Usage" -S 0 -o "Memory usage: total:98302.09 Mb - used: 54664.65 Mb (56%) - free: 43637.44 Mb (44%)"'...
[1636387730.259086] [064.1] [pid=10816] Making callbacks (type 10)...
[1636387730.260085] [001.0] [pid=14846] process_macros()
[1636387730.462615] [256.1] [pid=10816] Execution time=0.203 sec, early timeout=0, result=0, output=Sent 1 checks to https://10.5.8.x/nrdp/
That seems fine.
Nagios.cfg:
obsess_over_services=1
ocsp_command=send_nrdp_service
obsess_over_hosts=1
ochp_command=send_nrdp_host
commands.cfg:
define command{
command_name send_nrdp_host
command_line $USER1$/send_nrdp.sh -u https://10.5.8.x/nrdp/ -t XXXX -H "$HOSTNAME$" -s $HOSTSTATEID$ -o "$HOSTOUTPUT$"
}
define command{
command_name send_nrdp_service
command_line $USER1$/send_nrdp.sh -u https://10.5.8.x/nrdp/ -t XXXX -H "$HOSTNAME$" -s "$SERVICEDESC$" -S $SERVICESTATEID$ -o "$SERVICEOUTPUT$"
}
(Am I missing smething?)
-
- Madmin
- Posts: 9190
- Joined: Thu Oct 30, 2014 9:02 am
Re: Add Nagios 3.2.3 server to Nagios xi configuration
I do not have access to a Suse linux enterprise server 11 patchlevel 3 server that is active. The one I have access to does not work because of the older version of OPENSSL, curl and wget which will not allow the script to run because the TLS version is too old.
Try this, change to the nagios user by running this.
Then run this to get detailed output of the scriot.
Post the output.
I did see one thing wrong in the nagios.cfg file.
For the send_nrdp_host command, change the command line from
to
Save and restart Nagios.
The HOSTSTATEID option has to be upper case.
Thank you.
Try this, change to the nagios user by running this.
Code: Select all
su - nagios
Code: Select all
bash -x /usr/local/nagios/libexec/send_nrdp.sh -u https://10.5.8.x/nrdp/ -t XXXX -H "sqlsrv01" -s "Memory Usage" -S 0 -o "Memory usage: total:98302.09 Mb - used: 54664.65 Mb (56%) - free: 43637.44 Mb (44%)"
I did see one thing wrong in the nagios.cfg file.
For the send_nrdp_host command, change the command line from
Code: Select all
$USER1$/send_nrdp.sh -u https://10.5.8.x/nrdp/ -t XXXX -H "$HOSTNAME$" -s $HOSTSTATEID$ -o "$HOSTOUTPUT$"
Code: Select all
$USER1$/send_nrdp.sh -u https://10.5.8.x/nrdp/ -t XXXX -H "$HOSTNAME$" -S $HOSTSTATEID$ -o "$HOSTOUTPUT$"
The HOSTSTATEID option has to be upper case.
Thank you.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 22
- Joined: Fri Apr 09, 2021 6:22 am
Re: Add Nagios 3.2.3 server to Nagios xi configuration
nagios:~ # su - nagios
nagios@nagios:~> bash -x /usr/local/nagios/libexec/send_nrdp.sh -u https://10.5.8.x/nrdp/ -t XXXX -H "sqlsrv01" -s "Memory Usage" -S 0 -o "Memory usage: total:98302.09 Mb - used: 54664.65 Mb (56%) - free: 43637.44 Mb (44%)"
++ basename /usr/local/nagios/libexec/send_nrdp.sh
+ PROGNAME=send_nrdp.sh
+ RELEASE='Revision 0.5'
+ getopts u:t:H:s:S
f:d:c:D:hv option
+ case $option in
+ url=https://10.5.8.x/nrdp/
+ getopts u:t:H:s:S
f:d:c:D:hv option
+ case $option in
+ token=XXXX
+ getopts u:t:H:s:S
f:d:c:D:hv option
+ case $option in
+ host=sqlsrv01
+ getopts u:t:H:s:S
f:d:c:D:hv option
+ case $option in
+ service='Memory Usage'
+ getopts u:t:H:s:S
f:d:c:D:hv option
+ case $option in
+ State=0
+ getopts u:t:H:s:S
f:d:c:D:hv option
+ case $option in
+ output='Memory usage: total:98302.09 Mb - used: 54664.65 Mb (56%) - free: 43637.44 Mb (44%)'
+ getopts u:t:H:s:S
f:d:c:D:hv option
+ '[' '!' ']'
+ checktype=1
+ '[' '!' ']'
++ echo -e '\t'
+ delim=' '
+ '[' xhttps://10.5.8.x/nrdp/ == x -o XXXX == x ']'
++ which curl
+ [[ /usr/bin/curl =~ /curl ]]
+ curl=1
++ which wget
+ [[ /usr/bin/wget =~ /wget ]]
+ wget=1
+ [[ ! -n 1 ]]
+ checkcount=0
+ '[' sqlsrv01 ']'
+ xml=
+ '[' sqlsrv01 == '' ']'
+ '[' 0 == '' ']'
+ '[' 'Memory Usage' '!=' '' ']'
+ xml='<checkresult type='\''service'\'' checktype='\''1'\''><servicename>Memory Usage</servicename>'
+ output='Memory usage: total:98302.09 Mb - used: 54664.65 Mb (56%) - free: 43637.44 Mb (44%)'
+ output='Memory usage: total:98302.09 Mb - used: 54664.65 Mb (56%) - free: 43637.44 Mb (44%)'
+ output='Memory usage: total:98302.09 Mb - used: 54664.65 Mb (56%) - free: 43637.44 Mb (44%)'
+ xml='<checkresult type='\''service'\'' checktype='\''1'\''><servicename>Memory Usage</servicename><hostname>sqlsrv01</hostname><state>0</state><output><![CDATA[Memory usage: total:98302.09 Mb - used: 54664.65 Mb (56%) - free: 43637.44 Mb (44%)]]></output></checkresult>'
+ checkcount=1
+ '[' '!' -t 0 ']'
+ '[' ']'
+ '[' ']'
+ '[' x == x ']'
+ '[' x == x ']'
+ xml='<?xml version='\''1.0'\''?><checkresults><checkresult type='\''service'\'' checktype='\''1'\''><servicename>Memory Usage</servicename><hostname>sqlsrv01</hostname><state>0</state><output><![CDATA[Memory usage: total:98302.09 Mb - used: 54664.65 Mb (56%) - free: 43637.44 Mb (44%)]]></output></checkresult></checkresults>'
+ send_data '<?xml version='\''1.0'\''?><checkresults><checkresult type='\''service'\'' checktype='\''1'\''><servicename>Memory Usage</servicename><hostname>sqlsrv01</hostname><state>0</state><output><![CDATA[Memory usage: total:98302.09 Mb - used: 54664.65 Mb (56%) - free: 43637.44 Mb (44%)]]></output></checkresult></checkresults>'
+ pdata='token=XXXX&cmd=submitcheck'
+ '[' '!' x1 == x ']'
+ '[' ']'
+ pdata='token=XXXX&cmd=submitcheck&XMLDATA=<?xml version='\''1.0'\''?><checkresults><checkresult type='\''service'\'' checktype='\''1'\''><servicename>Memory Usage</servicename><hostname>sqlsrv01</hostname><state>0</state><output><![CDATA[Memory usage: total:98302.09 Mb - used: 54664.65 Mb (56%) - free: 43637.44 Mb (44%)]]></output></checkresult></checkresults>'
++ curl -f --silent --insecure -d 'token=XXXX&cmd=submitcheck&XMLDATA=<?xml version='\''1.0'\''?><checkresults><checkresult type='\''service'\'' checktype='\''1'\''><servicename>Memory Usage</servicename><hostname>sqlsrv01</hostname><state>0</state><output><![CDATA[Memory usage: total:98302.09 Mb - used: 54664.65 Mb (56%) - free: 43637.44 Mb (44%)]]></output></checkresult></checkresults>' https://10.5.8.x/nrdp//
+ rslt='<?xml version="1.0" encoding="utf-8"?>
<result>
<status>0</status>
<message>OK</message>
<meta>
<output>1 checks processed</output>
</meta>
</result>'
+ ret=0
++ sed -n 's|.*<status>\(.*\)</status>.*|\1|p'
++ echo '<?xml' 'version="1.0"' 'encoding="utf-8"?>' '<result>' '<status>0</status>' '<message>OK</message>' '<meta>' '<output>1' checks 'processed</output>' '</meta>' '</result>'
+ status=0
++ sed -n 's|.*<message>\(.*\)</message>.*|\1|p'
++ echo '<?xml' 'version="1.0"' 'encoding="utf-8"?>' '<result>' '<status>0</status>' '<message>OK</message>' '<meta>' '<output>1' checks 'processed</output>' '</meta>' '</result>'
+ message=OK
+ '[' 0 '!=' 0 ']'
+ '[' 0 '!=' 0 ']'
+ '[' ']'
+ '[' 0 '!=' 0 ']'
+ echo 'Sent 1 checks to https://10.5.8.x/nrdp/'
Sent 1 checks to https://10.5.8.x/nrdp/
nagios@nagios:~>
And to make it weird, that check went to the xi server as unconfigured object.
nagios@nagios:~> bash -x /usr/local/nagios/libexec/send_nrdp.sh -u https://10.5.8.x/nrdp/ -t XXXX -H "sqlsrv01" -s "Memory Usage" -S 0 -o "Memory usage: total:98302.09 Mb - used: 54664.65 Mb (56%) - free: 43637.44 Mb (44%)"
++ basename /usr/local/nagios/libexec/send_nrdp.sh
+ PROGNAME=send_nrdp.sh
+ RELEASE='Revision 0.5'
+ getopts u:t:H:s:S
+ case $option in
+ url=https://10.5.8.x/nrdp/
+ getopts u:t:H:s:S
+ case $option in
+ token=XXXX
+ getopts u:t:H:s:S
+ case $option in
+ host=sqlsrv01
+ getopts u:t:H:s:S
+ case $option in
+ service='Memory Usage'
+ getopts u:t:H:s:S
+ case $option in
+ State=0
+ getopts u:t:H:s:S
+ case $option in
+ output='Memory usage: total:98302.09 Mb - used: 54664.65 Mb (56%) - free: 43637.44 Mb (44%)'
+ getopts u:t:H:s:S
+ '[' '!' ']'
+ checktype=1
+ '[' '!' ']'
++ echo -e '\t'
+ delim=' '
+ '[' xhttps://10.5.8.x/nrdp/ == x -o XXXX == x ']'
++ which curl
+ [[ /usr/bin/curl =~ /curl ]]
+ curl=1
++ which wget
+ [[ /usr/bin/wget =~ /wget ]]
+ wget=1
+ [[ ! -n 1 ]]
+ checkcount=0
+ '[' sqlsrv01 ']'
+ xml=
+ '[' sqlsrv01 == '' ']'
+ '[' 0 == '' ']'
+ '[' 'Memory Usage' '!=' '' ']'
+ xml='<checkresult type='\''service'\'' checktype='\''1'\''><servicename>Memory Usage</servicename>'
+ output='Memory usage: total:98302.09 Mb - used: 54664.65 Mb (56%) - free: 43637.44 Mb (44%)'
+ output='Memory usage: total:98302.09 Mb - used: 54664.65 Mb (56%) - free: 43637.44 Mb (44%)'
+ output='Memory usage: total:98302.09 Mb - used: 54664.65 Mb (56%) - free: 43637.44 Mb (44%)'
+ xml='<checkresult type='\''service'\'' checktype='\''1'\''><servicename>Memory Usage</servicename><hostname>sqlsrv01</hostname><state>0</state><output><![CDATA[Memory usage: total:98302.09 Mb - used: 54664.65 Mb (56%) - free: 43637.44 Mb (44%)]]></output></checkresult>'
+ checkcount=1
+ '[' '!' -t 0 ']'
+ '[' ']'
+ '[' ']'
+ '[' x == x ']'
+ '[' x == x ']'
+ xml='<?xml version='\''1.0'\''?><checkresults><checkresult type='\''service'\'' checktype='\''1'\''><servicename>Memory Usage</servicename><hostname>sqlsrv01</hostname><state>0</state><output><![CDATA[Memory usage: total:98302.09 Mb - used: 54664.65 Mb (56%) - free: 43637.44 Mb (44%)]]></output></checkresult></checkresults>'
+ send_data '<?xml version='\''1.0'\''?><checkresults><checkresult type='\''service'\'' checktype='\''1'\''><servicename>Memory Usage</servicename><hostname>sqlsrv01</hostname><state>0</state><output><![CDATA[Memory usage: total:98302.09 Mb - used: 54664.65 Mb (56%) - free: 43637.44 Mb (44%)]]></output></checkresult></checkresults>'
+ pdata='token=XXXX&cmd=submitcheck'
+ '[' '!' x1 == x ']'
+ '[' ']'
+ pdata='token=XXXX&cmd=submitcheck&XMLDATA=<?xml version='\''1.0'\''?><checkresults><checkresult type='\''service'\'' checktype='\''1'\''><servicename>Memory Usage</servicename><hostname>sqlsrv01</hostname><state>0</state><output><![CDATA[Memory usage: total:98302.09 Mb - used: 54664.65 Mb (56%) - free: 43637.44 Mb (44%)]]></output></checkresult></checkresults>'
++ curl -f --silent --insecure -d 'token=XXXX&cmd=submitcheck&XMLDATA=<?xml version='\''1.0'\''?><checkresults><checkresult type='\''service'\'' checktype='\''1'\''><servicename>Memory Usage</servicename><hostname>sqlsrv01</hostname><state>0</state><output><![CDATA[Memory usage: total:98302.09 Mb - used: 54664.65 Mb (56%) - free: 43637.44 Mb (44%)]]></output></checkresult></checkresults>' https://10.5.8.x/nrdp//
+ rslt='<?xml version="1.0" encoding="utf-8"?>
<result>
<status>0</status>
<message>OK</message>
<meta>
<output>1 checks processed</output>
</meta>
</result>'
+ ret=0
++ sed -n 's|.*<status>\(.*\)</status>.*|\1|p'
++ echo '<?xml' 'version="1.0"' 'encoding="utf-8"?>' '<result>' '<status>0</status>' '<message>OK</message>' '<meta>' '<output>1' checks 'processed</output>' '</meta>' '</result>'
+ status=0
++ sed -n 's|.*<message>\(.*\)</message>.*|\1|p'
++ echo '<?xml' 'version="1.0"' 'encoding="utf-8"?>' '<result>' '<status>0</status>' '<message>OK</message>' '<meta>' '<output>1' checks 'processed</output>' '</meta>' '</result>'
+ message=OK
+ '[' 0 '!=' 0 ']'
+ '[' 0 '!=' 0 ']'
+ '[' ']'
+ '[' 0 '!=' 0 ']'
+ echo 'Sent 1 checks to https://10.5.8.x/nrdp/'
Sent 1 checks to https://10.5.8.x/nrdp/
nagios@nagios:~>
And to make it weird, that check went to the xi server as unconfigured object.
-
- Madmin
- Posts: 9190
- Joined: Thu Oct 30, 2014 9:02 am
Re: Add Nagios 3.2.3 server to Nagios xi configuration
So far, everything looks good.
Let's enable debugging on the xi server.
Edit this file on the Nagios xi server.
Change this line from
to
Save the file and make sure this file exists by running the following
Restart Apache
Wait for the Core system to send it's data and get the /usr/local/nrdp/server/debug.log file from the xi server and add it to the post.
Thank you.
Let's enable debugging on the xi server.
Edit this file on the Nagios xi server.
Code: Select all
/usr/local/nrdp/server/config.inc.php
Code: Select all
$cfg["debug"] = false;
Code: Select all
$cfg["debug"] = true;
Code: Select all
touch /usr/local/nrdp/server/debug.log
chown nagios.nagios /usr/local/nrdp/server/debug.log
chmod ugo+rw /usr/local/nrdp/server/debug.log
Code: Select all
systemctl restart httpd
Thank you.
Be sure to check out our Knowledgebase for helpful articles and solutions!