Ad Widget

Collapse

Active mode vs Passive mode results not even remotely similar

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • w00tburger
    Junior Member
    • Mar 2018
    • 21

    #1

    Active mode vs Passive mode results not even remotely similar

    I noticed while utilizing active checks that the overall metrics were not accurate. The performance graph below is when I was running a heavy install on the system. I noticed that just before the Zabbix agent checked in, the CPU usage would drop to roughly nothing, and then immediately spike back up to ~80 percent or so. During this timeframe, the agent had sent back that it was hardly under any load.

    I activated passive checking, and you can immediately see the graph grow reflecting its true results. Re-niceing and prioritizing the zabbix agent on my linux system (while running active mode) had no affect on obtaining accurate results. Below I have labeled when I was running active vs running passive below. Has anyone had any similar experiences to this?

    Zabbix agent marked topped system priority
    Click image for larger version

Name:	top.png
Views:	1656
Size:	121.9 KB
ID:	356724

    Results:
    Click image for larger version

Name:	zabbixresults.png
Views:	1738
Size:	133.6 KB
ID:	356726
    Attached Files
  • kloczek
    Senior Member
    • Jun 2006
    • 1771

    #2
    Did you change items type from "zabbix agent" to "zabbix agent (active)" after changing agent settings? (remove Server= and add ServerActive=)
    http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
    https://kloczek.wordpress.com/
    zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
    My zabbix templates https://github.com/kloczek/zabbix-templates

    Comment

    • w00tburger
      Junior Member
      • Mar 2018
      • 21

      #3
      I have. Currently the server is registered as (Server=127.0.0.1,. ActiveServer=:10051). It is register data and new values if you look closely... It just doesnt even come close as to what is actually happening on the server side.

      Comment

      • kloczek
        Senior Member
        • Jun 2006
        • 1771

        #4
        Not ActiveServer= but ServerActive=. With SverActive you must ad as well StartAgents=0.
        If all items on monitored host are "zabbix agent (active(" you can remove as well Server= entry from agent configuration.
        I'm not sure does ServerActive=:10051 is correct. try just use ServerActive=localhost.
        What do you see in agent logs? Do you see that agent after query server receives in reply configuration data about monitored items?
        Last edited by kloczek; 07-04-2018, 21:57.
        http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
        https://kloczek.wordpress.com/
        zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
        My zabbix templates https://github.com/kloczek/zabbix-templates

        Comment

        • w00tburger
          Junior Member
          • Mar 2018
          • 21

          #5
          That was a typo. It is ServerActive, and it is running on port 10051. I also have StarAgents=0 configured so there are no passive checks being performed. In the logs, I see active checks taking place w/o error. Like I said, there is data reporting, but CPU reports 3.5 usage, when switching over to passive shows 50-70
          Last edited by w00tburger; 08-04-2018, 00:43.

          Comment

          • kloczek
            Senior Member
            • Jun 2006
            • 1771

            #6
            As long as I don't know about what ind of errors you are talking about I cannot help you.
            And again: what do you see in agent logs? Do you see that agent after query server/proxy receives in reply configuration data about monitored items?
            http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
            https://kloczek.wordpress.com/
            zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
            My zabbix templates https://github.com/kloczek/zabbix-templates

            Comment

            • w00tburger
              Junior Member
              • Mar 2018
              • 21

              #7
              I mentioned that I had not seen any errors in the logs. I see that the client is checking into the server without issue.

              Comment

              • kloczek
                Senior Member
                • Jun 2006
                • 1771

                #8
                Try to increase DebugLevel and check do you see that agent receives monitoring data, probes items which are defined in host items and sends batches of the monitoring data to the server/proxy.
                It must be some silly configuration bug. Active monitoring definitely works
                http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
                https://kloczek.wordpress.com/
                zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
                My zabbix templates https://github.com/kloczek/zabbix-templates

                Comment

                • w00tburger
                  Junior Member
                  • Mar 2018
                  • 21

                  #9
                  I will poke around with this a little later. I have no doubt that Active mode works, I can see that it is reporting. But does Active mode work as well as passive mode and have as accurate results?

                  Comment

                  • w00tburger
                    Junior Member
                    • Mar 2018
                    • 21

                    #10
                    So I bumped up the logs to debug level 5, and here is what I am seeing. The upper left is a server with the zabbix agent logs set to debug 5. Upper right is the same server installing server packages. The lower terminal is the zabbix server itself. We can see that the CPU is barely reporting usage. If I switch this to passive it will shoot past 50%

                    Click image for larger version  Name:	zBfHHR7.jpg Views:	1 Size:	81.1 KB ID:	356915


                    Click image for larger version

Name:	image_10839.png
Views:	1649
Size:	95.1 KB
ID:	356913

                    Comment

                    • kloczek
                      Senior Member
                      • Jun 2006
                      • 1771

                      #11
                      I really do not understand your case.
                      You just delivered prove have monitoring data and seems you have some doubts about correctness of the data?
                      So about what kind of the items data you have such doubts? All items or only some of them?
                      Can you show example definitions of those items?

                      Passive agent passive is about what triggers collecting the data.In case of the passiiv it is server or proxy which establish connectivity to the agent to collect single item point. In case active proxy whole batch of monitoring configuration is delivered to the agent and decides when and what needs to be sampled. Then monitoring data are collected/buffered in agent buffer and periodically are delivered inform of batches to the proxy/server.
                      On obtaining data over passive or active items exactly the same code in agent is used.

                      BTW usually DebugLevel=3 is max what is necessary to spot the exchange of the data between agent ans server/proxy.
                      http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
                      https://kloczek.wordpress.com/
                      zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
                      My zabbix templates https://github.com/kloczek/zabbix-templates

                      Comment

                      • w00tburger
                        Junior Member
                        • Mar 2018
                        • 21

                        #12
                        Yes, the correctness of the data seems very different when the agent is checking into the server vs when the server is polling the agent. That is what this thread is about. Above the underlines of the graph show my instance installing all sorts of software. While that is going on, I switched from Passive to Active. Immediately on Zabbix you can see that the user time metric almost falls all the way flat. Upon switching it back to passive, you can see that the metric spikes once again

                        Comment

                        • samantha9276
                          Banned
                          • Sep 2018
                          • 2

                          #13
                          Active mode are similar to blue stacks guides and can troubleshoot the problem.

                          Comment

                          • zux
                            Member
                            • Sep 2018
                            • 93

                            #14
                            What is the hostname? Remember, that in atcive agent, only the hostname defines which host this is, the ip has no meaning

                            Comment

                            • ingus.vilnis
                              Senior Member
                              Zabbix Certified Trainer
                              Zabbix Certified SpecialistZabbix Certified Professional
                              • Mar 2014
                              • 908

                              #15
                              Interesting case but most likely there is the Hostname / IP mismatch when using the Active / Passive checks thus resulting in seeing data for completely different hosts.

                              For passive checks. In Configuration -> Hosts open that Grafana host and see what IP / DNS is there? Then verify that the same IP / DNS is on the actual grafana host. In case you have e.g. 127.0.0.1 there and IP selected instead of DNS (even if configured) then you will see the CPU for your Zabbix server instead of another remote host.

                              For active checks. In Configuration -> Hosts open that Grafana host and see what is the Host name defined. Now open zabbix_agentd.cong file on grafana host and verify if the Hostname= setting is 300% identical to what you have in the GUI.

                              And once that is done, run "top" on the grafana host to see the numbers from OS and open Zabbix to verify if they are similar.

                              Active and Passive checks don't differ how the data is obtained on the actual monitored device. It only defines how Zabbix Server and Agent communicates with each other to send the data over the network.

                              On a side note - how does it differ on the agent side whether you use active or passive checks? I ran a short test. ~150 items doing basic Linux, CPU, Disks, Network, some MySQL internals etc. Normally set to Active.
                              With Active items CPU utilization % for the zabbix_agentd process is about 0.8% and RAM 16.4M. Set those ~150 items to passive, the CPU went up about 0.1-0.2 % and RAM + 4.5M. Run that for 2 hours, set back to active. CPU returned to previous levels but RAM was not released (yet).

                              Comment

                              Working...