Check_http post Xml doesnt work
Posted: Mon Aug 10, 2020 11:37 pm
hi,
when using check_http command locally on the Nagios server it is working.
command:
/usr/local/nagios/libexec/check_http -H XXXXX -k 'SOAPAction: "http://tempuri.org/ZZZZZZZZZZ/IsAlive"' -p 80 -u '/YYYYYYYY/ZZZZZZZZ.svc' -T text/xml -P '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/"><soapenv:Header/>< ... v:Envelope>' -r 'true'
result:
HTTP OK: HTTP/1.1 200 OK - 538 bytes in 0.004 second response time |time=0.003737s;;;0.000000 size=538B;;;0
but when i configure the Nagios service it doesnt working:
service config:
define service {
service_description Http - check CashoutProcessService.svc
use xiwizard_generic_service
hostgroup_name ntsapp-servers
check_command check_http!-H XXXXXXXX -k 'SOAPAction: "http://tempuri.org/ZZZZZZZZZ/IsAlive"' -p 80 -u '/YYYYYYY/ZZZZZZZZZZ.svc' -T 'text/xml' -P '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/"><soapenv:Header/>< ... v:Envelope>' -r 'true'!!!!!!!
max_check_attempts 2
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_period xi_timeperiod_24x7
notifications_enabled 1
register 1
}
result:
/usr/local/nagios/libexec/check_http -I durg-pltone-01.888prod.local -H durg-pltone-02.888prod.local -k 'SOAPAction: "http://tempuri.org/IAccountDataServices/IsAlive"' -p 80 -u '/PlatformOneWS/AccountDataServices.svc' -T 'text/xml' -P '' -r 'true'
HTTP CRITICAL: HTTP/1.1 400 Bad Request - pattern not found - 206 bytes in 0.004 second response time |time=0.004370s;;;0.000000 size=206B;;;0
for some reason Nagios doesnt process my post XML.
can anyone help
when using check_http command locally on the Nagios server it is working.
command:
/usr/local/nagios/libexec/check_http -H XXXXX -k 'SOAPAction: "http://tempuri.org/ZZZZZZZZZZ/IsAlive"' -p 80 -u '/YYYYYYYY/ZZZZZZZZ.svc' -T text/xml -P '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/"><soapenv:Header/>< ... v:Envelope>' -r 'true'
result:
HTTP OK: HTTP/1.1 200 OK - 538 bytes in 0.004 second response time |time=0.003737s;;;0.000000 size=538B;;;0
but when i configure the Nagios service it doesnt working:
service config:
define service {
service_description Http - check CashoutProcessService.svc
use xiwizard_generic_service
hostgroup_name ntsapp-servers
check_command check_http!-H XXXXXXXX -k 'SOAPAction: "http://tempuri.org/ZZZZZZZZZ/IsAlive"' -p 80 -u '/YYYYYYY/ZZZZZZZZZZ.svc' -T 'text/xml' -P '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/"><soapenv:Header/>< ... v:Envelope>' -r 'true'!!!!!!!
max_check_attempts 2
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_period xi_timeperiod_24x7
notifications_enabled 1
register 1
}
result:
/usr/local/nagios/libexec/check_http -I durg-pltone-01.888prod.local -H durg-pltone-02.888prod.local -k 'SOAPAction: "http://tempuri.org/IAccountDataServices/IsAlive"' -p 80 -u '/PlatformOneWS/AccountDataServices.svc' -T 'text/xml' -P '' -r 'true'
HTTP CRITICAL: HTTP/1.1 400 Bad Request - pattern not found - 206 bytes in 0.004 second response time |time=0.004370s;;;0.000000 size=206B;;;0
for some reason Nagios doesnt process my post XML.
can anyone help