Ad Widget

Collapse

web.page.regexp problems

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • freax
    Junior Member
    • Apr 2005
    • 19

    #1

    web.page.regexp problems

    Hi.

    I'm using version 2.2.6 for server, 2.2.5 for agents and don't know if web.page.regexp it's working as expected ! I have the following item but returns nothing, or error 400:
    web.page.regexp[{HOST.IP},"/solr/statistics/admin/ping?wt=json",8983,"status\":\"([.+])\""]

    While trying to simulate this on same web server, it gives the following results:
    telnet 192.168.1.1 8983
    Trying 192.168.1.1...
    Connected to 192.168.1.1.
    Escape character is '^]'.
    GET /solr/statistics/admin/ping?wt=json HTTP/1.1

    HTTP/1.1 400 Bad Request
    Connection: close

    Connection closed by foreign host.

    I think it's what web.page.regexp is getting. So another test, the correct one:
    telnet 192.168.1.1 8983
    Trying 192.168.1.1...
    Connected to 192.168.1.1.
    Escape character is '^]'.
    GET /solr/statistics/admin/ping?wt=json HTTP/1.1
    Host: 192.168.1.1

    HTTP/1.1 200 OK
    Last-Modified: Wed, 12 Nov 2014 18:19:01 GMT
    ETag: "MjBiNjA0ADMwMDAwMDAwMFNvbHI="
    Content-Type: application/json; charset=UTF-8
    Transfer-Encoding: chunked

    10
    {"status":"OK"}

    0

    Connection closed by foreign host.

    Now it's getting the expected results. For sure, web.page.regexp option is passing the Host: 192.168.1.1 command to web server, or I am doing something wrong ?

    Thanks in advance.
    Last edited by freax; 13-11-2014, 00:02. Reason: identation
  • kustodian
    Member
    • Oct 2012
    • 33

    #2
    Have you tried testing this with zabbix_get? Have you also tried testing with web.page.get[host,<path>,<port>]?

    Comment

    Working...