Ad Widget

Collapse

Monitoring multiple Zabbix servers

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • karlism
    Junior Member
    • Sep 2015
    • 10

    #1

    Monitoring multiple Zabbix servers

    Hello!

    I'm having problems with monitoring multiple Zabbix servers from one Zabbix server host. Configuration is following:
    ZBX01 - first zabbix server
    ZBX02 - second zabbix server

    ZBX01 is monitoring both ZBX01 and ZBX02. But the problem is that "Zabbix server" item data reported is identical for both servers, even though their configuration and workload is very different. Every other item group is monitored correctly on both servers, the only problem is with "Zabbix server" items.

    Both servers have "Template OS Linux" and "Template App Zabbix Server" linked to them.

    I've tried debugging the issue, but I can't see any relevant information in Zabbix server logs. I've also tried to get values from both servers by zabbix_get command, but it reports the following error:
    $ zabbix_get -s XXX.XXX.XXX.XXX -k "zabbix[history]"
    ZBX_NOTSUPPORTED: Unsupported item key.

    Zabbix server and agent version is 2.4.6.

    Has anyone else experienced issue like this?
    Thanks!
  • IanHavelock
    Junior Member
    • Nov 2015
    • 10

    #2
    Please post Server and ServerActive details from both zabbix_agentd.conf files from the servers, along with Hostnames of each Server? It is possible that your configuration is confused between what needs to go in the Server conf and what needs to go in the agent conf - I've seen it a few times

    Comment

    • karlism
      Junior Member
      • Sep 2015
      • 10

      #3
      [username@zbx01 ~]$ cat /etc/zabbix/zabbix_agentd.conf| grep -e Server -e Hostname
      Server=zbx01
      ServerActive=zbx01
      Hostname=zbx01

      [username@zbx02 ~]# cat /etc/zabbix/zabbix_agentd.conf| grep -e Server -e Hostname
      Server=zbx01
      ServerActive=zbx01
      Hostname=zbx02

      I've also verified that all hostnames resolve correctly from both sides and that agent interface IPs are correct for both hosts in Zabbix server host configuration.

      One thing I noticed though is that Template App Zabbix Server items miss host interface settings. Is it supposed to be so?
      Attached Files
      Last edited by karlism; 25-11-2015, 09:14.

      Comment

      • IanHavelock
        Junior Member
        • Nov 2015
        • 10

        #4
        The Template App Zabbix Server items are configured with the type "Zabbix internal", that is, no host interface is involved, it will just monitor its own internal processes.

        If you want to monitor another Zabbix Server, I think you'll have to clone the template (call it "Remote Zabbix Server" or similar) and configure each of the monitored items to be of type "Zabbix Agent" instead of "Zabbix internal" - that way the host interface is then specified.

        Comment

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

          #5
          Hi,

          Monitoring a Zabbix server from another Zabbix server is not a good idea.

          In the original post you did try zabbix_get. It works only for items having type Zabbix agent . You will never get data for internal items with it.

          Modifying or cloning "Template App Zabbix Server" and setting all items to have type "Zabbix agent" will only result in not supported items.

          And even if you link the default template to another Zabbix server, the data will be always displayed for current Zabbix server no matter where it is linked. I think you even can link it to any random host and it will still report stats from current Zabbix server. That is why they are called "internal items".

          Also if you are monitoring proxy internal stats, never do it from server directly. Proxies should be monitored by themselves at all times.

          So the bottom line is - monitoring of multiple Zabbix servers with one server with standard methods is not really doable. Also why would you really need this?

          Best Regards,
          Ingus

          Comment

          • WagnerEits
            Junior Member
            • Aug 2017
            • 28

            #6
            Similar problem

            Is there a way to monitor multiple hosts with only one instance of the zabbix agent running?

            I have four host to monitor:

            But since monitoring is (active cheks) I need to set the host name in zabbix_agentd.conf:

            Hostname= host1

            How can I monitor multiple hosts without rolling multiple instances?

            For example, in zabbix_agentd.conf:

            Hostname: host1, host2, host3

            Comment

            • allexpetrov
              Senior Member
              Zabbix Certified Trainer
              Zabbix Certified SpecialistZabbix Certified Professional
              • May 2017
              • 361

              #7
              Originally posted by WagnerEits
              Is there a way to monitor multiple hosts with only one instance of the zabbix agent running?

              I have four host to monitor:

              But since monitoring is (active cheks) I need to set the host name in zabbix_agentd.conf:

              Hostname= host1

              How can I monitor multiple hosts without rolling multiple instances?

              For example, in zabbix_agentd.conf:

              Hostname: host1, host2, host3
              Hi WagnerEits,
              You actually can't. You need to have separate client for every machine, or you can use SNMP/Simple Checks for monitoring them in Agent-less mode.

              Regards,
              Alexey!
              Last edited by allexpetrov; 22-08-2017, 15:05.

              Comment

              • WagnerEits
                Junior Member
                • Aug 2017
                • 28

                #8
                And how do I run multiple instances of the agent on the same machine, with multiple configuration files. In linux

                Comment

                • allexpetrov
                  Senior Member
                  Zabbix Certified Trainer
                  Zabbix Certified SpecialistZabbix Certified Professional
                  • May 2017
                  • 361

                  #9
                  Originally posted by WagnerEits
                  And how do I run multiple instances of the agent on the same machine, with multiple configuration files. In linux
                  Why do you need to run the multiple instances on one linux machine?

                  If you went through the manual, then I assume that you have setup like:

                  Zabbix "Server" (Actually there is 3 componenets, which can be installed on separate machine - Frontend, Server App, SQL DB) as well as you have installed the Zabbix Agent. Those components are installed on top of the CentOS. Lets name this server ZBX1. In this setup your CentOS server is monitored by Zabbix Agent and "sends" data to your Zabbix Server. This is internal process only for ZBX1.

                  You want to monitor 4 linux hosts, SRV1,2,3,4. So you need to install on every server Zabbix Agent, edit the config file and add them to the ZBX1 Frontend. here the Zabbix Agent will monitor SRV and will send data to the Zabbix Server on ZBX1.

                  Regards,
                  Alex

                  Comment

                  • WagnerEits
                    Junior Member
                    • Aug 2017
                    • 28

                    #10
                    I have several log files generated by nfDump. And I need the best solution to monitor them, and generate graphs with the data, what would be the most effective method to do this collection? Are many data generated. I have four hosts, each one generates a large amount of data in a log file. I am currently using zabbix agent active checks, but I can monitor only one host because I have to put its name in the agent configuration file. Is there a better way to do this collection?


                    hostname in zabbix_agentd.conf
                    Click image for larger version

Name:	hostnameee.png
Views:	2
Size:	5.5 KB
ID:	313908

                    list of hosts to be monitored
                    Click image for larger version

Name:	hosts.png
Views:	2
Size:	3.9 KB
ID:	313909

                    Comment

                    Working...