Ad Widget

Collapse

Web scenario check on non http(s) ports?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • schoeppi
    Member
    • Jan 2024
    • 31

    #1

    Web scenario check on non http(s) ports?

    Hello,

    is it possible to setup web scenario checks for services on other ports then 80 and / or 443? We have some services that run on e.g. port 8443 and I am not able to create web scenarios for this services. I tried to specify the URL with the port included like this without success:



    Is this not working or am I doing something wrong?

    What kind of check can I configure to check services on non http or https ports?

    We are using dockerized Zabbix 6.4.11.

    Ciao and thanks for any hint,

    Schoepp
  • dimir
    Zabbix developer
    • Apr 2011
    • 1080

    #2
    Can you elaborate on "without success"? There must be a particular error message which you did not provide. The field URL in a web scenario step supports port number.

    More information:
    https://www.zabbix.com/documentation/current/en/manual/web_monitoring#configuring-steps
    https://curl.se/libcurl/c/CURLOPT_URL.html

    Comment

    • schoeppi
      Member
      • Jan 2024
      • 31

      #3
      The scenario is called service.example.com and in the first step of the scenario I specified the URL like this:



      Also I specified a pattern to search for in the boddy.

      Because the service is running with a self signed certificate I aditionaly unchecked the ssl related things in the authentication tab.

      I can reach the URL with curl from the running zabbix server container with the following command so it is no network issue:

      curl -kvL https://service.example.com:8443/some/uri/

      In the trigger for the scenario I am using this expression:

      * Name: Web scenario "service.example.com" failed: {ITEM.VALUE}
      * Expression: length(last(/v131.linova.de/web.test.error[service.example.com]))>0 and last(/v131.linova.de/web.test.fail[service.example.com])>0

      And the error is:

      Web scenario "service.example.com" failed: Failed to connect to service.example.com port 443 after 2 ms : : Connection refused

      The strange thing that the check changed its state to RESOLVED after I've removed the pattern to searchin the body, but the "Connection refused" error is still shown.

      So the check seems to work now because the state is RESOLVED, but why do I still get the connection refused error?

      On the page you posted I was not able to find a example with a non http or https port, at least not in the text of the manual page. Is the example shown in a picture? Then it would be clear that I've not seen it, because I am blind an working with a screen reading software this kind of information is not visible for me.

      In general this is a big issue for me with Zabbix... In the documentation some things are only clear if the regarding picture can be seen and many conceptual things are only shown in YouTube videos and are not that well explained just as text. So lets say there is a video about items and triggers and in the video a experession is shown sighted people can see and understand this expression, but for me its completely inaccessible. And as another downside the content and maybe the explanation for the items, triggers and expression can not be found via a search engine. The web UI has no big issues with a screen reading software, but the documentation, especialy the basic concepts, could be more accessible and better explained for those people who are not able to work with visual content or who do not want to work with such kind of content...

      Comment

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

        #4
        Selinux?

        If you want to determine whether zabbix can connect to all TCP ports, you must turn on the zabbix_can_network boolean. Disabled by default.

        setsebool -P zabbix_can_network 1

        Comment

        • schoeppi
          Member
          • Jan 2024
          • 31

          #5
          We use a dockerized zabbix environment. Do the selinux settings matter in this case?

          I saw this settings before but thought they are not relevant because of docker...

          Comment

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

            #6
            I think it may have influence, as docker cannot really override the rules and permissions given from "outside" It would be quite ridiculous if one would be able to override everything just because "docker"..
            But THB, I only know that containers exist.. But we do not have common ground..

            Comment

            Working...