Page 1 of 1

Checks are now escaping special characters on 5.7.2

Posted: Fri Jul 17, 2020 11:01 am
by dietdrpepper
Since we have upgraded to the latest Nagios XI multiple of our checks are now being URL escaped which are now failing. Here's an example.

Image

However when we go to the URL in a browser we get the actual response. My question is why the URL portion is now being escaped?

Code: Select all

[[email protected] ~]$ /usr/local/nagios/libexec/check_http -H 172.31.57.64 -s "success" -f ok -I 172.31.57.64 -u '/1/dealer_info?app=Browser&auth_token=fdzbFRfxxpFQAXExHBYL' -S -p 443
HTTP CRITICAL: HTTP/1.1 404 Not Found - string 'success' not found on 'https://172.31.57.64:443/1/dealer_info\?app=Browser\&auth_token=fdzbFRfxxpFQAXExHBYL' - 1061 bytes in 0.014 second response time |time=0.014098s;;;0.000000 size=1061B;;;0


Code: Select all

Nagios XI - System Info
System
Nagios XI version: 5.7.2
Release info: srvnagp01.securecomwireless.com 2.6.32-754.30.2.el6.x86_64 x86_64
CentOS release 6.10 (Final)
Gnome is not installed
Apache Information
PHP Version: 5.3.3
Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36
Server Name: nag.securecomwireless.com
Server Address: 172.31.53.13
Server Port: 80
Date/Time
PHP Timezone: US/Central
PHP Time: Fri, 17 Jul 2020 13:26:32 -0500
System Time: Fri, 17 Jul 2020 13:26:32 -0500
Nagios XI Data
License ends in: PQVNPS
UUID: 7bdbca69-ed44-4f87-9ece-d67917358667
Install Type: manual/unknown

nagios (pid 26903) is running...
NPCD running (pid 22484).
CPU Load 15: 0.35
Total Hosts: 219
Total Services: 2602

Function get_base_uri() returns: http://nag.securecomwireless.com/nagiosxi/
Function get_base_url() returns: http://nag.securecomwireless.com/nagiosxi/
Function get_backend_url(internal_call=false) returns: http://nag.securecomwireless.com/nagiosxi/includes/components/profile/profile.php
Function get_backend_url(internal_call=true) returns: http://localhost/nagiosxi/backend/

Ping Test localhost
Running:
/bin/ping -c 3 localhost 2>&1 
PING localhost.localdomain (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=1 ttl=64 time=0.045 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=2 ttl=64 time=0.030 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=3 ttl=64 time=0.018 ms

--- localhost.localdomain ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.018/0.031/0.045/0.011 ms
Test wget To localhost
WGET From URL: http://localhost/nagiosxi/includes/components/ccm/
Running:
/usr/bin/wget http://localhost/nagiosxi/includes/components/ccm/ 
--2020-07-17 13:26:34-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 27 [text/html]
Saving to: "/usr/local/nagiosxi/tmp/ccm_index.tmp"

0K 100% 2.72M=0s

2020-07-17 13:26:34 (2.72 MB/s) - "/usr/local/nagiosxi/tmp/ccm_index.tmp" saved [27/27]

Network Settings
1: lo:  mtu 65536 qdisc noqueue state UNKNOWN 

    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00

    inet 127.0.0.1/8 scope host lo

    inet6 ::1/128 scope host 

       valid_lft forever preferred_lft forever

2: eth0:  mtu 1500 qdisc pfifo_fast state UP qlen 1000

    link/ether 00:50:56:b7:f5:84 brd ff:ff:ff:ff:ff:ff

    inet 172.31.53.13/24 brd 172.31.53.255 scope global eth0

    inet6 fe80::250:56ff:feb7:f584/64 scope link 

       valid_lft forever preferred_lft forever


172.31.53.0/24 dev eth0  proto kernel  scope link  src 172.31.53.13 

169.254.0.0/16 dev eth0  scope link  metric 1002 

default via 172.31.53.1 dev eth0 


Nagios XI Components
actions	2.2.3
active_directory	0.3
alertcloud	1.2.1
alertstream	2.1.1
autodiscovery	2.2.6
backendapiurl	1.0.5
bandwidthreport	2.0.0
bbmap	1.2.1
birdseye	3.2.4
bulkmodifications	2.3.0
capacityplanning	2.3.1
ccm	3.0.6
custom-includes	1.0.6
customlogin	1.0.0
customlogo	1.2.0
deploydashboard	1.3.0
deploynotification	1.3.3
duo	1.0.2
escalationwizard	1.5.1
favorites	1.0.0
freevariabletab	1.1.0
globaleventhandler	1.3.0
graphexplorer	2.3.0
helpsystem	2.0.1
highcharts	
homepagemod	1.1.11
hypermap	1.2.1
hypermap_replay	1.2.0
isms	1.2.3
latestalerts	1.2.7
ldap_ad_integration	1.2.1
ldapauth	0.3
map	1.1.0
massacknowledge	2.2.2
massimmediatecheck	1.0.2
metrics	1.3.5
minemap	1.2.5
msp	1.2.0
mtr	1.0.3
nagiosbpi	3.0.0
nagioscore	
nagioscorecfg	
nagiosim	2.2.7
nagiosna	1.4.3
nagiosql	
nagvis	2.0.4
nocscreen	1.4.0
nrdsconfigmanager	1.6.9
nxti	1.0.4
opscreen	1.8.0
perfdata	
pingaction	1.1.2
pnp	
profile	1.4.1
proxy	1.1.5
rdp	1.0.5
rename	1.7.0
rssnotifications	1.2.0
scheduledbackups	1.2.0
scheduledreporting	
similetimeline	1.5.1
snmptrapsender	1.6.2
statusmap	1.0.3
tracerouteaction	1.1.2
twilio	1.0.0
usermacros	1.1.0
xicore	
Nagios XI Config Wizards
activedirectory	1.3.5
ec2	1.1.3
s3	1.1.2
java_tomcat	1.1.0
autodiscovery	1.4.2
bpiwizard	1.1.5
bulkhostimport	2.1.3
capacity-planning	1.0.2
dhcp	1.1.7
dnsquery	1.1.6
digitalocean	1.0.3
docker	1.1.1
domain_expiration	1.1.7
email-delivery	2.0.6
esensors_websensor	1.1.7
exchange	2.0.0
ftpserver	1.5.8
folder_watch	1.0.7
genericnetdevice	1.0.5
java_glassfish	1.1.0
google-cloud	1.0.3
hyperv	1.0.2
java_jboss	1.1.0
json	1.0.0
java_jetty	1.1.0
ldapserver	1.3.5
linode	1.0.3
linux_snmp	1.5.8
linux-server	1.5.9
mssql_database	2.0.0
mssql_query	1.6.7
mssql_server	2.0.0
macosx	2.0.0
mailserver	1.2.7
microsoft-azure	1.0.3
mongodb_database	1.1.5
mongodbserver	1.1.5
mountpoint	1.0.4
mysqlquery	1.2.5
mysqlserver	1.3.5
ncpa	3.0.0
nrpe	1.6.0
nsclient	1.0.0
nagioslogserver	1.0.8
nna	1.0.8
nagiosxiserver	1.3.3
nagiostats	1.2.3
switch	2.5.3
oraclequery	1.3.9
oracleserverspace	1.5.9
oracletablespace	1.5.10
passivecheck	1.2.6
postgresdb	1.5.5
postgresquery	1.2.5
postgresserver	1.3.6
printer	1.1.5
radiusserver	2.0.4
rackspace	1.0.3
sla	1.3.4
snmp	1.6.5
snmp_trap	1.5.5
snmpwalk	2.0.1
ssh-expect	1.4
sshproxy	1.5.9
solaris	1.3.3
tcpudpport	1.3.5
tftp	1.0.4
passiveobject	1.1.3
vmware	1.7.4
watchguard	1.4.7
webtransaction	1.2.7
java_weblogic	1.1.0
website	1.4.2
website_defacement	1.2.2
websiteurl	1.4.1
windowsdesktop	2.0.0
windowseventlog	2.0.2
windowssnmp	1.5.7
windowsserver	2.0.0
windowswmi	2.2.1
xml	1.0.0
Nagios XI Dashlets
alertcloud	
bbmap	
capacityplanning	
graphexplorer	
hypermap	
latestalerts	
metrics	
metricsguage	
minemap	
xicore_xi_news_feed	
xicore_getting_started	
xicore_admin_tasks	
xicore_eventqueue_chart	
xicore_component_status	
xicore_server_stats	
xicore_monitoring_stats	
xicore_monitoring_perf	
xicore_monitoring_process	
xicore_perfdata_chart	
xicore_host_status_summary	
xicore_service_status_summary	
xicore_comments	
xicore_hostgroup_status_overview	
xicore_hostgroup_status_grid	
xicore_servicegroup_status_overview	
xicore_servicegroup_status_grid	
xicore_hostgroup_status_summary	
xicore_servicegroup_status_summary	
xicore_available_updates	
xicore_network_outages	
xicore_network_outages_summary	
xicore_network_health	
xicore_host_status_tac_summary	
xicore_service_status_tac_summary	
xicore_feature_status_tac_summary	
availability	
custom_dashlet	1.0.7
gauges	1.2.2
googlemapdashlet	1.1.0
internettrafficreport	
rss_dashlet	1.1.5
sansrisingports	2.0
servicegroupservices	1.0
sla	
worldtimeserver	2.0.0

Re: Checks are now escaping special characters on 5.7.2

Posted: Fri Jul 17, 2020 4:44 pm
by cdienger
I'm not able to reproduce this so far. Please confirm the plugin version with:

Code: Select all

/usr/local/nagios/libexec/check_http -V

Re: Checks are now escaping special characters on 5.7.2

Posted: Fri Jul 17, 2020 4:47 pm
by dietdrpepper
check_http v2.3.3 (nagios-plugins 2.3.3)

Re: Checks are now escaping special characters on 5.7.2

Posted: Mon Jul 20, 2020 4:52 pm
by cdienger
I believe this is just impacting the test button feature. Do you see the same behavior on the command line? On the command line run the command with the "-v" option as well:

Code: Select all

/usr/local/nagios/libexec/check_http -H 172.31.57.64 -s "success" -f ok -I 172.31.57.64 -u '/1/dealer_info?app=Browser&auth_token=fdzbFRfxxpFQAXExHBYL' -S -p 443 -v