(Return code of 25 for service 'CRONOS' on host 'CRONOS' was out of bounds)
No close element tag [Ln: 14, Col: 57]
Are you 100% sure there are no other fields required to be posted? this could cause it to not authenticate properly.
i figured out that one line has double quotation lines at the end. That's why the out of bound message. After i corrected that. i got the error i mentioned before
Are you 100% sure there are no other fields required to be posted with the authentication? This could cause it to not authenticate properly, and likely not return the output you expect.
I also did notice the lack of a / in our examples we were using too
scottwilkerson wrote:Are you 100% sure there are no other fields required to be posted with the authentication? This could cause it to not authenticate properly, and likely not return the output you expect.
I also did notice the lack of a / in our examples we were using too
[root@nagios webinject]# curl -X POST -vvv -d 'login=LOGIN&passwd=PASSWORD' http://XXX.XXX.XXX/csl/check
* About to connect() to XXX.XXX.XXX port 80 (#0)
* Trying XXX.XXX.XXX... connected
* Connected to XXX.XXX.XXX (XXX.XXX.XXX) port 80 (#0)
> POST /csl/check HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.27.1 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: XXX.XXX.XXX
> Accept: */*
> Content-Length: 25
> Content-Type: application/x-www-form-urlencoded
>
* HTTP 1.0, assume close after body
< HTTP/1.0 200 OK
< Server: ZK Web Server
< Pragma: no-cache
< Cache-control: no-cache
< Content-Type: text/html;
< Connection: close
<
<HTML>
<HEAD><TITLE></TITLE>
<META http-equiv=Content-Type content='text/html;'>
</HEAD>
<BODY topMargin=0 leftMargin=0>
<Script language=JavaScript type='text/javascript'>alert('Failed'+':'+'Error Input!');self.location.href='/';</Script>
</BODY></HTML>
* Closing connection #0
Regarding the question. I Think there are no other field required for the authentication. i also checked the missing "/" the script is correct, i accidentally removed one / when i replaced with the X. the xml is fine
ok i founded what the error was... the user and password field wasn't the same on your example than the one i have on my web.
[root@nagios webinject]# curl -X POST -vvv -d 'username=USER&userpwd=PASS' http://IP/csl/check
* About to connect() to IP port 80 (#0)
* Trying IP... connected
* Connected to IP (IP) port 80 (#0)
> POST /csl/check HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.27.1 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: IP
> Accept: */*
> Content-Length: 28
> Content-Type: application/x-www-form-urlencoded
>
* HTTP 1.0, assume close after body
< HTTP/1.0 200 OK
< Server: ZK Web Server
< Pragma: no-cache
< Cache-control: no-cache
< Content-Type: text/html;
< Connection: close
<
HTTP/1.0 200 OK
Server: ZK Web Server
Pragma: no-cache
Cache-control: no-cache
Content-Type: text/html;
Connection: close
Now, when i run the check i got the following error
(Return code of 25 for service 'CRONOS' on host 'CRONOS' was out of bounds)
Only Comments, PIs and whitespace allowed at end of document [Ln: 10, Col: 1]
[root@nagios webinject]# /usr/local/nagios/libexec/check_webinject.sh CRONOS__CRONOS_config.xml
could not find ParserDetails.ini in /usr/lib64/perl5/XML/SAX
Use of uninitialized value $case{"postbody"} in string at ./webinject.pl line 611.
WebInject CRITICAL - Test case number 2 failed |time=10.132;30;;0
[root@nagios libexec]# /usr/local/nagiosxi/etc/components/webinject/webinject.pl -c CRONOS__CRONOS_config.xml
could not find ParserDetails.ini in /usr/lib64/perl5/XML/SAX
< character not allowed in attribute values [Ln: 16, Col: 86]