scottwilkerson wrote:What output did you get from these commands?
Code: Select all
/usr/bin/php /usr/local/nagios/libexec/check_nagiosxiserver.php --address=xxx.xxx.xxx.xxx --url='http://xxx.xxx.xxx.xxx/nagiosxi/' --apikey='r96rbk8p' --mode=iowait --warn="7" --crit="17" --debug=1
/usr/bin/php /usr/local/nagios/libexec/check_nagiosxiserver.php --address=xxx.xxx.xxx.xxx --url='https://xxx.xxx.xxx.xxx/nagiosxi/' --apikey='r96rbk8p' --mode=iowait --warn="7" --crit="17" --debug=1
The 5.5.1 system trying to access the remote end:
Code: Select all
[5.5.1]# /usr/bin/php /usr/local/nagios/libexec/check_nagiosxiserver.php --address=192.168.4.3 --url='http://192.168.4.3/nagiosxi/' --apikey='r96rbk8p' --mode=iowait --warn="7" --crit="17" --debug=1
ACCESSING URL: http://192.168.4.3/nagiosxi/api/v1/system/statusdetail?apikey=r96rbk8p
RESULT:
Array
(
[headers] => Array
(
)
[body] =>
[info] => Array
(
[url] => http://192.168.4.3/nagiosxi/api/v1/system/statusdetail?apikey=r96rbk8p
[content_type] =>
[http_code] => 0
[header_size] => 0
[request_size] => 173
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 10.094681
[namelookup_time] => 7.0E-5
[connect_time] => 0.086283
[pretransfer_time] => 0.086292
[size_upload] => 0
[size_download] => 0
[speed_download] => 0
[speed_upload] => 0
[download_content_length] => -1
[upload_content_length] => 0
[starttransfer_time] => 0
[redirect_time] => 0
[certinfo] => Array
(
)
)
)
Error: Could not parse JSON from http://192.168.4.3/nagiosxi/ ()
[5.5.1]#
Code: Select all
[5.5.1]# /usr/bin/php /usr/local/nagios/libexec/check_nagiosxiserver.php --address=192.168.4.3 --url='https://192.168.4.3/nagiosxi/' --apikey='r96rbk8p' --mode=iowait --warn="7" --crit="17" --debug=1
ACCESSING URL: https://192.168.4.3/nagiosxi/api/v1/system/statusdetail?apikey=r96rbk8p
RESULT:
Array
(
[headers] => Array
(
)
[body] =>
[info] => Array
(
[url] => https://192.168.4.3/nagiosxi/api/v1/system/statusdetail?apikey=r96rbk8p
[content_type] =>
[http_code] => 0
[header_size] => 0
[request_size] => 0
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0
[namelookup_time] => 9.5E-5
[connect_time] => 0.081822
[pretransfer_time] => 0
[size_upload] => 0
[size_download] => 0
[speed_download] => 0
[speed_upload] => 0
[download_content_length] => -1
[upload_content_length] => -1
[starttransfer_time] => 0
[redirect_time] => 0
[certinfo] => Array
(
)
)
)
Error: Could not parse JSON from https://192.168.4.3/nagiosxi/ ()
[5.5,1}#
I also ran it on the 5.5.2 system on itself:
Code: Select all
[5.5.2]# /usr/bin/php /usr/local/nagios/libexec/check_nagiosxiserver.php --address=192.168.4.3 --url='http://192.168.4.3/nagiosxi/' --apikey='r96rbk8p' --mode=iowait --warn="7" --crit="17" --debug=1
ACCESSING URL: http://192.168.4.3/nagiosxi/api/v1/system/statusdetail?apikey=r96rbk8p
RESULT:
Array
(
[headers] => Array
(
[Date] => Sun, 26 Aug 2018 16:27:41 GMT
[Server] => Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.4.16
[X-Powered-By] => PHP/5.4.16
[Access-Control-Allow-Orgin] => *
[Access-Control-Allow-Methods] => *
[Content-Length] => 2377
[Content-Type] => application/json
)
[body] => {"dbbackend":{"last_checkin":"2018-08-26 17:27:14","bytes_processed":"2147483647","entries_processed":"11733095","connect_time":"2018-08-26 00:00:04","disconnect_time":"0000-00-00 00:00:00"},"load":{"updated":"2018-08-26 17:27:21.985906","load1":"5.43","load5":"5.25","load15":"5.25"},"memory":{"updated":"2018-08-26 17:27:21.995359","total":"31878","used":"2012","free":"4027","shared":"383","buffers":"25837","cached":"28891"},"swap":{"updated":"2018-08-26 17:27:22.002468","total":"34811","used":"10","free":"34801"},"feedprocessor":{"last_check":"1535300842"},"iostat":{"updated":"2018-08-26 17:27:27.010522","user":"15.35","nice":"0.00","system":"4.32","iowait":"0.01","steal":"0.00","idle":"80.32"},"reportengine":{"last_check":"1535300821"},"sysstat":{"last_check":"1535300841"},"cleaner":{"last_check":"1535300821"},"deadpool_reaper":{"last_check":"1535300821"},"perfdataprocessor":{"last_check":"1535300851"},"nom":{"last_check":"1535300824"},"eventman":{"last_check":"1535300860"},"cmdsubsys":{"last_check":"1535300860"},"dbmaint":{"last_check":"1535300701"},"daemons":{"updated":"2018-08-26 17:27:21.951551","daemon":[{"@attributes":{"id":"nagioscore"},"name":"nagios","output":"Aug 26 17:02:53 londnms1 nagios[26517]: External command error: Command failed","return_code":"0","status":"0"},{"@attributes":{"id":"pnp"},"name":"npcd","output":"Aug 23 17:56:07 londnms1 systemd[1]: Started SYSV: Visit the Website at http:\/\/sourceforge.net\/projects\/pnp4nagios\/.","return_code":"0","status":"0"},{"@attributes":{"id":"ndoutils"},"name":"ndo2db","output":"Aug 26 17:27:14 londnms1 ndo2db[26569]: Trimming eventhandlers.","return_code":"0","status":"0"}]},"nagioscore":{"updated":"2018-08-26 17:27:21.976596","activehostchecks":{"val1":"232","val5":"249","val15":"249"},"passivehostchecks":{"val1":"0","val5":"0","val15":"0"},"activeservicechecks":{"val1":"3207","val5":"3245","val15":"3245"},"passiveservicechecks":{"val1":"0","val5":"0","val15":"0"},"activehostcheckperf":{"min_latency":"0","max_latency":"1.0587","avg_latency":"0.013703373493975903","min_execution_time":"0.00127","max_execution_time":"0.58298","avg_execution_time":"0.3493775100401604"},"activeservicecheckperf":{"min_latency":"0","max_latency":"1.04119","avg_latency":"0.010001188725490193","min_execution_time":"0","max_execution_time":"10.00142","avg_execution_time":"0.23886316789215695"}}}
[info] => Array
(
[url] => http://192.168.4.3/nagiosxi/api/v1/system/statusdetail?apikey=r96rbk8p
[content_type] => application/json
[http_code] => 200
[header_size] => 262
[request_size] => 173
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0.22216
[namelookup_time] => 6.2E-5
[connect_time] => 0.000168
[pretransfer_time] => 0.00024
[size_upload] => 0
[size_download] => 2377
[speed_download] => 10699
[speed_upload] => 0
[download_content_length] => 2377
[upload_content_length] => 0
[starttransfer_time] => 0.222123
[redirect_time] => 0
[certinfo] => Array
(
)
[primary_ip] => 192.168.4.3
[primary_port] => 80
[local_ip] => 192.168.4.3
[local_port] => 56982
[redirect_url] =>
)
)
XML DATA LOOKS OK
Ok: I/O Wait = 0.01%|iowait=0.01%;7;17;;
[5.5.2]#
Code: Select all
[5.5.2]# /usr/bin/php /usr/local/nagios/libexec/check_nagiosxiserver.php --address=192.168.4.3 --url='https://192.168.4.3/nagiosxi/' --apikey='r96rbk8p' --mode=iowait --warn="7" --crit="17" --debug=1
ACCESSING URL: https://192.168.4.3/nagiosxi/api/v1/system/statusdetail?apikey=r96rbk8p
RESULT:
Array
(
[headers] => Array
(
[Date] => Sun, 26 Aug 2018 16:32:46 GMT
[Server] => Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.4.16
[X-Powered-By] => PHP/5.4.16
[Access-Control-Allow-Orgin] => *
[Access-Control-Allow-Methods] => *
[Content-Length] => 2379
[Content-Type] => application/json
)
[body] => {"iostat":{"updated":"2018-08-26 17:32:27.148458","user":"15.78","nice":"0.00","system":"5.04","iowait":"0.01","steal":"0.00","idle":"79.16"},"sysstat":{"last_check":"1535301141"},"reportengine":{"last_check":"1535301121"},"deadpool_reaper":{"last_check":"1535301121"},"cleaner":{"last_check":"1535301121"},"nom":{"last_check":"1535301124"},"perfdataprocessor":{"last_check":"1535301161"},"dbbackend":{"last_checkin":"2018-08-26 17:32:19","bytes_processed":"2147483647","entries_processed":"11787085","connect_time":"2018-08-26 00:00:04","disconnect_time":"0000-00-00 00:00:00"},"load":{"updated":"2018-08-26 17:32:42.351932","load1":"5.23","load5":"5.29","load15":"5.26"},"memory":{"updated":"2018-08-26 17:32:42.362687","total":"31878","used":"1992","free":"4041","shared":"383","buffers":"25844","cached":"28909"},"swap":{"updated":"2018-08-26 17:32:42.37042","total":"34811","used":"10","free":"34801"},"dbmaint":{"last_check":"1535301001"},"feedprocessor":{"last_check":"1535301162"},"cmdsubsys":{"last_check":"1535301165"},"eventman":{"last_check":"1535301166"},"daemons":{"updated":"2018-08-26 17:32:42.305036","daemon":[{"@attributes":{"id":"nagioscore"},"name":"nagios","output":"Aug 26 17:02:53 londnms1 nagios[26517]: External command error: Command failed","return_code":"0","status":"0"},{"@attributes":{"id":"pnp"},"name":"npcd","output":"Aug 23 17:56:07 londnms1 systemd[1]: Started SYSV: Visit the Website at http:\/\/sourceforge.net\/projects\/pnp4nagios\/.","return_code":"0","status":"0"},{"@attributes":{"id":"ndoutils"},"name":"ndo2db","output":"Aug 26 17:32:19 londnms1 ndo2db[26569]: Trimming eventhandlers.","return_code":"0","status":"0"}]},"nagioscore":{"updated":"2018-08-26 17:32:42.341868","activehostchecks":{"val1":"233","val5":"249","val15":"249"},"passivehostchecks":{"val1":"0","val5":"0","val15":"0"},"activeservicechecks":{"val1":"3202","val5":"3245","val15":"3245"},"passiveservicechecks":{"val1":"0","val5":"0","val15":"0"},"activehostcheckperf":{"min_latency":"0","max_latency":"0.02616","avg_latency":"0.00012417670682730923","min_execution_time":"0.00118","max_execution_time":"0.57536","avg_execution_time":"0.35010325301204825"},"activeservicecheckperf":{"min_latency":"0","max_latency":"0.151","avg_latency":"0.0006672549019607849","min_execution_time":"0","max_execution_time":"10.00147","avg_execution_time":"0.23870321078431364"}}}
[info] => Array
(
[url] => https://192.168.4.3/nagiosxi/api/v1/system/statusdetail?apikey=r96rbk8p
[content_type] => application/json
[http_code] => 200
[header_size] => 262
[request_size] => 173
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0.373981
[namelookup_time] => 6.0E-5
[connect_time] => 0.000156
[pretransfer_time] => 0.129898
[size_upload] => 0
[size_download] => 2379
[speed_download] => 6361
[speed_upload] => 0
[download_content_length] => 2379
[upload_content_length] => 0
[starttransfer_time] => 0.373972
[redirect_time] => 0
[certinfo] => Array
(
)
[primary_ip] => 192.168.4.3
[primary_port] => 443
[local_ip] => 192.168.4.3
[local_port] => 41982
[redirect_url] =>
)
)
XML DATA LOOKS OK
Ok: I/O Wait = 0.01%|iowait=0.01%;7;17;;
[5.5.2]#