Iḿ trying to use the plugin check_http to verify the result of an access to one URL to check if the responses of the server are ok.
This is the URL I want to check :
Code: Select all
http://172.31.0.28:81/odbc/odbc_mapper_table.php?tb=ura_saldo&pr=%20WHERE%20'$runparam'%20=%20'1805,8419195204000,1,2121729026'Code: Select all
<documento>
<dados>
<linha>
<Saldo>000</Saldo>
<Pagtomin>000</Pagtomin>
<CC>84</CC>
<cartao>8419195204000</cartao>
<param>8419195204000</param>
<NroOrigem>ANA LUCIA DE LIMA COSTA</NroOrigem>
</linha>
</dados>
</documento>Code: Select all
# links "http://172.31.0.28:81/odbc/odbc_mapper_table.php?tb=ura_saldo&pr=%20WHERE%20%27\$runparam%27%20=%20%271805,8419195204000,1,2121729026%27"Code: Select all
<?xml version = "1.0" encoding = "ISO-8859-1"?>
<documento>
<dados>
<linha>
<Saldo>000</Saldo>
<Pagtomin>000</Pagtomin>
<CC>84</CC>
<cartao>8419195204000</cartao>
<param>8419195204000</param>
<NroOrigem>ANA LUCIA DE LIMA COSTA</NroOrigem>
</linha>
</dados>
</documento>Code: Select all
# /usr/libexec/nagios/check_http -H 172.31.0.28 -p81 -s "ANA LUCIA DE LIMA COSTA" -u "/odbc/odbc_mapper_table.php?tb=ura_saldo&pr=%20WHERE%20%27\$runparam%27%20=%20%271805,8419195204000,1,2121729026%27"
HTTP OK: HTTP/1.1 200 OK - 522 bytes in 2.953 second response time |time=2.952692s;;;0.000000 size=522B;;;0Code: Select all
define service{
use prioritary-service
host_name servidor-ura
service_description WEBTX-ura
check_command check_http_ip!$HOSTADDRESS$!-p81 -s "ANA LUCIA DE LIMA COSTA" -u "/odbc/odbc_mapper_table.php?tb=ura_saldo&pr=%20WHERE%20%27\$runparam%27%20=%20%271805,8419195204000,1,2121729026%27"
contact_groups cpd,support
}Code: Select all
HTTP CRITICAL: HTTP/1.1 200 OK - string 'ANA LUCIA DE LIMA COSTA' not found on 'http://172.31.0.28:81/odbc/odbc_mapper_table.php?tb=ura_saldo&pr=%20WHERE%20%27%27%20=%20%271805,8419195204000,1,2121729026%27$' - 422 bytes in 2.105 second response time Also if the command definition is changed to:
Code: Select all
define service{
use prioritary-service
host_name servidor-ura
service_description WEBTX-ura
check_command check_http_ip!$HOSTADDRESS$!-p81 -u "/odbc/odbc_mapper_table.php?tb=ura_saldo&pr=%20WHERE%20%27\$runparam%27%20=%20%271805,8419195204000,1,2121729026%27" -s "ANA LUCIA DE LIMA COSTA"
contact_groups cpd,support
}Code: Select all
HTTP CRITICAL: HTTP/1.1 200 OK - string 'ANA LUCIA DE LIMA COSTA$' not found on 'http://172.31.0.28:81/odbc/odbc_mapper_table.php?tb=ura_saldo&pr=%20WHERE%20%27%27%20=%20%271805,8419195204000,1,2121729026%27' - 421 bytes in 2.029 second response time Am I missing something? How can I fix this?
Please, any help will be very appreciated.