Ad Widget

Collapse

Problems with web.page.get

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • igor.gorjanc
    Junior Member
    • Mar 2024
    • 3

    #1

    Problems with web.page.get

    I'm using Zabbix Agent 2 for Windows (version 6.4) and would like to use web.page.get for monitoring.
    web.page.get works with zabbix_get:
    Code:
    zabbix_get -s localhost -k web.page.get[http://localhost:1234/MyService/Version]
    HTTP/1.1 200 OK
    Connection: close
    Content-Length: 73
    Content-Type: application/json; charset=utf-8
    Date: Mon, 18 Mar 2024 11:02:59 GMT
    Server: Microsoft-HTTPAPI/2.0
    
    "Service version: 47.3.8826.0"
    So I add UserParameter into zabbix_agent2.conf:
    Code:
    UserParameter=MyVersion,web.page.get[http://localhost:1234/MyService/Version]
    This doesn't work
    Code:
    zabbix_get -s localhost -k MyVersion
    'web.page.get[http:' is not recognized as an internal or external command,operable program or batch file.
    What am I doing wrong?
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    Why do you add this key to userparameter? Of course you get error as your host does not know a thing about command called web.page.get
    Go and configure the ITEM in zabbix gui, using that key... and assign that to your host and get all the results...

    Comment

    • igor.gorjanc
      Junior Member
      • Mar 2024
      • 3

      #3
      Well, this way it would be only possible to make passive checks. However I need to use only active checks in order to avoid issues with firewall.
      So, is there any native way to do active checks for a UserParameter that checks a web page?

      Comment

      • cyber
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Dec 2006
        • 4807

        #4
        web.page.get works as active item without issues... Just need to set type to "active" and you are done.

        Comment

        Working...