Ad Widget

Collapse

Active agent doesn't allow systemd?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • panoramix
    Junior Member
    • Aug 2023
    • 1

    #1

    Active agent doesn't allow systemd?

    I have a host configured with agent2 in passive mode. It works great, but I'm migrating the server and running in active mode. I can't seem to get Systemd by Zabbix agent 2 working in active mode. Other data is showing up fine in active mode. I can even allow active & passive mode to be running (to seperate servers). What is going on? I can't seem to find any documentation or information that leads me to an answer, just a few error messages to chase.

    Errors Ive found:
    • Cannot find host interface on "host" for item key "systemd.unit.discovery[service]".
      • This occurs when I don't have a interface value for a active agent even though other data is showing up.
    • ​Discovery rule "Zabbix server:systemd.unit.discovery[service]" became not supported: Unsupported item key.
      • This occurs when I add a ip to interface field and then it lets me add "Systemd by Zabbix agent 2" template to host. But the data never shows up.
    Any ideas? My gut feeling is that somehow systemd is not supported in active mode?
  • studero
    Member
    • Aug 2023
    • 84

    #2
    Originally posted by panoramix
    I have a host configured with agent2 in passive mode. It works great, but I'm migrating the server and running in active mode. I can't seem to get Systemd by Zabbix agent 2 working in active mode. Other data is showing up fine in active mode. I can even allow active & passive mode to be running (to seperate servers). What is going on? I can't seem to find any documentation or information that leads me to an answer, just a few error messages to chase.

    Errors Ive found:
    • Cannot find host interface on "host" for item key "systemd.unit.discovery[service]".
      • This occurs when I don't have a interface value for a active agent even though other data is showing up.
    • ​Discovery rule "Zabbix server:systemd.unit.discovery[service]" became not supported: Unsupported item key.
      • This occurs when I add a ip to interface field and then it lets me add "Systemd by Zabbix agent 2" template to host. But the data never shows up.
    Any ideas? My gut feeling is that somehow systemd is not supported in active mode?

    Hi panoramix,

    I have the same problem with Linux 11 (Bullseye). But it's run correctly with RedHat 8.8 and 9.2. What is you Linux version ? Do you have found a solution ?

    Comment

    • dimir
      Zabbix developer
      • Apr 2011
      • 1080

      #3
      Can you go to the host configuration and check. it's discovery rule Service units discovery? Is there any error in the Info column?

      Comment

      • studero
        Member
        • Aug 2023
        • 84

        #4
        Originally posted by dimir
        Can you go to the host configuration and check. it's discovery rule Service units discovery? Is there any error in the Info column?
        Yes, they are an error. This is "Unsupported item key."

        Comment

        • dimir
          Zabbix developer
          • Apr 2011
          • 1080

          #5
          You are saying you are migrating the server, did you also upgrade it? Does it work in passive mode (you can test the passive mode by running
          Code:
          zabbix_get [...] -t systemd.unit.discovery

          Comment

          • studero
            Member
            • Aug 2023
            • 84

            #6
            Originally posted by dimir
            You are saying you are migrating the server, did you also upgrade it? Does it work in passive mode (you can test the passive mode by running
            Code:
            zabbix_get [...] -t systemd.unit.discovery

            I need help to use this commande. Like this ?

            # zabbix_get -s name_of_client -k systemd.unit.discovery
            zabbix_get [1078238]: Timeout while executing operation​

            But I have a timeout.

            I have run a test another server. But its works. May be I have a problem with the configuration of the firewall. I will check
            Last edited by studero; 09-10-2023, 16:59.

            Comment

            • studero
              Member
              • Aug 2023
              • 84

              #7
              Originally posted by dimir
              You are saying you are migrating the server, did you also upgrade it? Does it work in passive mode (you can test the passive mode by running
              Code:
              zabbix_get [...] -t systemd.unit.discovery
              Hi,

              After open the firewall on the client, the commande
              # zabbix_get -s name_of_client -k systemd.unit.discovery

              give a good output.

              And reconfigure the client on the Zabbix console. That's work good.
              Last edited by studero; 10-10-2023, 09:56.

              Comment

              • Skydrex
                Junior Member
                • Apr 2023
                • 2

                #8
                Originally posted by studero

                Hi,

                After open the firewall on the client, the commande
                # zabbix_get -s name_of_client -k systemd.unit.discovery

                give a good output.

                And reconfigure the client on the Zabbix console. That's work good.
                Why did you do that?
                The whole point of Agent Active is to push data to the server, so you don't have to configure firewall for incoming connections to the client host.

                When you opened the firewall on the client - Passive checks became available and it worked, but not in Active Mode.

                I am facing the same issue, other active checks is okay, but Systemd by Zabbix agent 2 is just refuses to work
                ​

                Comment

                • z0nk
                  Member
                  • Oct 2024
                  • 45

                  #9
                  Originally posted by Skydrex

                  Why did you do that?
                  The whole point of Agent Active is to push data to the server, so you don't have to configure firewall for incoming connections to the client host.

                  When you opened the firewall on the client - Passive checks became available and it worked, but not in Active Mode.

                  I am facing the same issue, other active checks is okay, but Systemd by Zabbix agent 2 is just refuses to work
                  Exactly. I have the same problem and I have to use active mode which doesn't work.

                  Comment

                  • troffasky
                    Senior Member
                    • Jul 2008
                    • 567

                    #10
                    Originally posted by Skydrex

                    Why did you do that?
                    Is there any equivalent to "zabbix_get" for active items? I don't believe there is. So when you are trying to troubleshoot a specific item key, just testing in passive mode is the most straightforward thing to do.

                    Comment

                    • z0nk
                      Member
                      • Oct 2024
                      • 45

                      #11
                      Originally posted by troffasky

                      Is there any equivalent to "zabbix_get" for active items? I don't believe there is. So when you are trying to troubleshoot a specific item key, just testing in passive mode is the most straightforward thing to do.
                      But how, when there is no routing to do it passively from the WAN interface to servers in LAN...

                      Comment

                      • z0nk
                        Member
                        • Oct 2024
                        • 45

                        #12
                        Code:
                        zabbix_agent2 -t systemd.unit.discovery
                        works on my host, why I am not geting that information on main server/web GUI? I have active monitoring

                        Comment

                        • troffasky
                          Senior Member
                          • Jul 2008
                          • 567

                          #13
                          How are items configured on template? Factory template "Systemd by Zabbix agent 2" has discovery item type of "Zabbix agent" not "Zabbix agent (active)". So if your agents are active-only then you will need to have an active mode copy of this template.
                          I tested it on a passive agent running Agent2 and it just like Windows services discovery - tens of services "not running" triggers about services that are probably irrelevant :d. Don't think I will be rolling this out everywhere just yet.

                          Comment

                          • z0nk
                            Member
                            • Oct 2024
                            • 45

                            #14
                            Originally posted by troffasky
                            How are items configured on template? Factory template "Systemd by Zabbix agent 2" has discovery item type of "Zabbix agent" not "Zabbix agent (active)". So if your agents are active-only then you will need to have an active mode copy of this template.
                            I tested it on a passive agent running Agent2 and it just like Windows services discovery - tens of services "not running" triggers about services that are probably irrelevant :d. Don't think I will be rolling this out everywhere just yet.
                            omg... can you help me configure this?
                            So if your agents are active-only then you will need to have an active mode copy of this template.
                            this is so hard for new users to deal with it. Zabbix looks like some new software with new born problems...

                            I know how do copy of template, but where is "active mode"?

                            tens of services "not running" triggers about services that are probably irrelevant
                            There is option for select/ignore in macros, but don't ask me how use it :-)
                            Last edited by z0nk; 30-10-2024, 17:44.

                            Comment

                            • troffasky
                              Senior Member
                              • Jul 2008
                              • 567

                              #15
                              Originally posted by z0nk
                              I know how do copy of template, but where is "active mode"?
                              It's per-item, per discovery item and per item prototype. You have to change every one, or it will behave in unexpected ways!

                              Originally posted by troffasky
                              Is there any equivalent to "zabbix_get" for active items? I don't believe there is
                              Originally posted by z0nk
                              zabbix_agent2 -t systemd.unit.discovery
                              OK, so there is, then

                              Comment

                              Working...