Ad Widget

Collapse

HTTP requests

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Lexus45
    Junior Member
    • Nov 2017
    • 3

    #1

    HTTP requests

    Hello all.

    I'm new to Zabbix and I have a question, the answer to which I haven't found neither here, nor in official documentation.

    I wonder if it's possible to send some HTTP request (for example with curl) to Zabbix server, so when requests are sent regularly, there are no triggers about problems. But if there is no such a request for e.g. 15 minutes - to show some trigger and send some kind of alert.

    I'm just not sure what are keywords to search for such a solution.

    I'd like to integrate the availability of some services, Linux and Zabbix.

    For example, if iptables matched some traffic, access https://zabbix/some-url with CURL, and show no triggers.

    If no matches in 15 minutes (Zabbix haven't received some concrete request) - show trigger with alert.


    I'm ready to read and learn, I'm just not sure what to search for such kind of monitoring. Maybe someone will show me the right way.

    Debian 9.2.
    Zabbix 3.0.7.

    Best regards, Alexey
  • Lexus45
    Junior Member
    • Nov 2017
    • 3

    #2
    Or maybe such a scenario - if some bash script is executed by user Anna, access one Zabbix URL, if by other user, another one

    Code:
    #!/bin/bash
    
    ... some code ...
    
    
    if [ "$(whoami)" == "Anna" ]
    then
            /bin/curl http://zabbix/some-zbx-url
    else
            /bin/curl http://zabbix/other-zbx-url
    
    fi
    so, anyway zabbix will receive some data and understand that users execute the scripts, so everything is OK.

    But if no access to any of URLs in 15 minutes - show trigger that something's wrong (the script is not executed by anybody).


    This is the logic that I need.

    1. But I can not understand what to configure in this case in Zabbix? Host? Item? What type? What settings?
    2. How to understand which URL should I access from the script?
    Last edited by Lexus45; 25-11-2017, 12:18.

    Comment

    • Lexus45
      Junior Member
      • Nov 2017
      • 3

      #3
      Now I know at least that I need to read documentation about Zabbix API.

      Comment

      Working...