Ad Widget

Collapse

Conceptual question regarding web checks

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

    #1

    Conceptual question regarding web checks

    Hi,

    on our servers we run one or more web services. The server has its own ip address and each server has its own address too.

    No I wonder whats the best and most efficient way to check those web services with Zabbix. There are at least three possibilities that I see:

    1. Connect the checks for the web services to the server where the service is running. This is OK, but I have to move the check to a new host if the web service is moved to another host which happens from time to time. Advantage is that there is a dependency between the host and its services for the checks.

    2. Connect the web service checks to the Zabbix server. In this case I do not have to rework the check if the service is moved to another machine, but on the other hand there is now connection / dependency between the service and the host where it is running on.

    3. Create a extra host for every web service in Zabbix and add the check for the web service. This can be done because every webservice has its own ip address, but there would be no dependency to the server where the web service is running.

    Whats the best concept in Zabbix to setup web service monitoring for our scenario? Is there another approach that I did not have on my list and how do you setup Zabbix to do such kind of monitoring?

    Cheers and thanks for any help and hints!

    Schoepp
  • dimir
    Zabbix developer
    • Apr 2011
    • 1080

    #2
    I'm not sure I got you right, do you mean each web service has its own IP but runs still on the same host machine (either virtual or physical, doesn't matter)?

    If the web service is just a service that has its own IP I don't see a reason to have a host for each one (#3), although if you think you might later add more checks related to that IP that might make sense.

    I don't know if you know but there is a notion of Low-Level Discovery in Zabbix using which you could discover all running web services and throw a template on each. This is if I understand you correctly that the list of web services is not static.

    Otherwise you also might consider how exactly you want to check the web service, using:
    1. HTTP Agent (simple HTTP request)
    2. Web Scenario (more complex test, like "log in, what's on that page, log out")
    3. (Java)Script Item (more complex like request-response chain that involves processing a data in between, only JavaScript language is supported)

    Comment

    • schoeppi
      Member
      • Jan 2024
      • 31

      #3
      Hi,

      thanks for your answer.

      Our servers have one main ip, e.g. 10.200.32.10 for the first machine, 10.200.32.11 for the second machine and so on. The web services on the machines, which are mostly docker deployments, do have the ips 10.200.34.10 for the first service, 10.200.34.11 for the second service and so on. Sometimes a service moves from one to another machine but the ip for the service stays the same, the ip is just migrated to the new machine. And of course sometimes a server is destroyed after all services with their regarding ips have been moved to another machine or even to different other machines and of course sometimes services are destroyed too.

      We still use Icinga until we have all things in Zabbix up and running and in Icinga services are connected to a host object which is very static. Maybe thats why I am thinking it would be good to connect a check for a web service in Zabbix also to a host. But of course this would be not very dynamic and if I have the possibility to make those checks more dynamic and host independent in Zabbix I really like to have such a dynamic setup where it does not matter on machine a service it is running ;-).

      I am very new to Zabbix and some of the basic concepts are still not clear to me. I'll take a look to the different kind of web checks you suggested, but I do already know that we will need many simple checks for a web service is up and running and maybe check the content of a page with a regex, but for some checks we will need more complex things like log into the service, check if login was succesfull and so on, so maybe we will need to check the services with different approaches.

      Thanks again for your help!

      Comment

      • schoeppi
        Member
        • Jan 2024
        • 31

        #4
        Hi again,

        I looked through the different ways you posted to monitor web items and I think web scenarios are the method we can use the most:



        But whats still not clear to me: Do I configure those different web items as different web items for our Zabbix host? I think this would be the best because as mentioned before the service could move between servers. So for that reason it does not make sense to configure this items to the different servers where the service could run on. Did I get this right and is adding the different web items to the Zabbix host correct?

        Ciao and thanks again!

        Comment

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

          #5
          Yes, you can add multiple web scenarios to one host, each one pointing to different endpoint (IP). Webcheck is anyway performed by server/proxy and not an agent. So you can always have a "general host", not related to any real server, which has all your webscenarios attached...

          Comment

          • schoeppi
            Member
            • Jan 2024
            • 31

            #6
            Thank you, now it is clear to me!

            Comment

            Working...