Ad Widget

Collapse

I can't get a distributed configuration to work

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Niels
    Senior Member
    • May 2007
    • 239

    #1

    I can't get a distributed configuration to work

    Hi,

    I can't get Zabbix to work. I have 3 machines, all running 1.4:


    A: The main server, with the web gui:
    OS: Suse 10
    IP: 172.16.167.14
    Config:
    NodeID=1
    DebugLevel=4
    PidFile=/var/tmp/zabbix_server.pid
    LogFile=/tmp/zabbix_server.log
    DBName=zabbix
    DBHost=localhost
    DBUser=zabbix_user
    DBPassword=******

    B: A node:
    OS: Debian 4.0
    IP: 172.16.167.106
    Config:
    NodeID=2
    DebugLevel=4
    PidFile=/var/tmp/zabbix_server.pid
    LogFile=/tmp/zabbix_server.log
    DBHost=localhost
    DBName=zabbix
    DBUser=zabbix_user
    DBPassword=******

    C: A machine with an agent:
    OS: Gentoo
    IP: 172.16.167.4
    Config:
    Server=172.16.167.106
    Hostname=struense
    RefreshActiveChecks=60
    DebugLevel=5
    PidFile=/var/tmp/zabbix_agentd.pid
    LogFile=/tmp/zabbix_agentd.log

    All machines can see each other. Zabbix_sender can send messages. Hostnames are resolved. A and B use Mysql. I've run "zabbix_server -n 1" on machine A, and "zabbix_server -n 2" on machine B. The databases appear to be correct. I've set up machine B as a node, and it appears to work.

    I've set up an item and a trigger for machine C -- monitoring to checksum of a file. The item uses a passive agent, but changing it to active doesn't change things. Everything appears to be configured correctly (vis-a-vis the manual), as far as I can see.

    The problem is that it doesn't work. Changes (hosts, items, rules) never propagate to the database on machine B, which I figure they should. And so, the agent never discovers that it's supposed to do anything.

    The logs don't help.
  • NOB
    Senior Member
    Zabbix Certified Specialist
    • Mar 2007
    • 469

    #2
    Hi,

    did you add the node in the configuration ?

    As soon as you create a local node, you'll have the configuration
    under "Administration / Nodes".

    HTH,

    Norbert.

    P.S. In 1.3.8 there was a bug in the DB. The itemid will contain the nodeid
    multiplied by a large number. It doesn't show up unless you use nodeid's
    greater than 0 - because 0 * any-large-number gives 0.

    Comment

    • Niels
      Senior Member
      • May 2007
      • 239

      #3
      I think I've set everything up correctly. I can see machine A and B in the nodes section. There are 10000... entries in the DB on machine A, and 20000... entries on machine B.

      Comment

      • NOB
        Senior Member
        Zabbix Certified Specialist
        • Mar 2007
        • 469

        #4
        Hi,

        I think that this part (distributed monitoring) was not very well tested.
        This is indicated by finding the bug for node id 1
        just a few days prior to the final release (1.4). We use
        PostgreSQL and not MySQL. Perhaps it is related to that.

        I was not able to test distributed monitoring, yet.

        We started evaluating ZABBIX with version 1.3.4,
        got some errors which stopped us from investigating further.
        And we wanted to know the main functionality of ZABBIX before we start
        proceeding to distributed monitoring.

        I played around with the nodeids and almost broke my DB
        containing all the templates I created.
        But I managed to restore it.
        I accidentilly ran the zabbix_server with a different nodeid
        in the DB and in the configuration file.
        Then I tried to fix it by setting another nodeid.
        Never, ever do it.
        You'll end up with two nodes in the DB pointing to the local
        node, the GUI will run in an endless loop, ...
        It took a lot of thinking and small work to keep the data.

        So, we are very interested in your experiences.
        I guess, we will create a real test environment in a few weeks.
        The request for resources (money and time) is on its way according to my
        boss.

        Regards,

        Norbert.

        Comment

        • Niels
          Senior Member
          • May 2007
          • 239

          #5
          Originally posted by NOB
          I think that this part (distributed monitoring) was not very well tested.
          This is indicated by finding the bug for node id 1
          just a few days prior to the final release (1.4).
          I'd agree there, plus the documentation on this is woefully sparse.

          Originally posted by NOB
          We use PostgreSQL and not MySQL. Perhaps it is related to that.
          Perhaps, but I'm not seeing any database errors in the logs. I'd prefer running SQLite on my nodes, but that didn't work at all. Mysql works on the main server.

          Originally posted by NOB
          I played around with the nodeids and almost broke my DB containing all the templates I created.
          Yep, I did that too. Fortunately my database was almost new.

          Originally posted by NOB
          So, we are very interested in your experiences.
          So far, my experiences are that Zabbix seems very nice, but doesn't work in my configuration. The documentation doesn't help, and most of my questions on these forums remain unanswered.

          Regards,
          Niels

          Comment

          • Alexei
            Founder, CEO
            Zabbix Certified Trainer
            Zabbix Certified SpecialistZabbix Certified Professional
            • Sep 2004
            • 5654

            #6
            Please give me some time to document distributed monitoring in details. I hope I could do this within a week or two.
            Alexei Vladishev
            Creator of Zabbix, Product manager
            New York | Tokyo | Riga
            My Twitter

            Comment

            • Niels
              Senior Member
              • May 2007
              • 239

              #7
              Originally posted by Alexei
              Please give me some time to document distributed monitoring in details. I hope I could do this within a week or two.
              Thank you, that would be excellent!
              Looking at my configuration above, are you confident that it should work with 1.4? What I mean is, did I do something wrong or could there possibly be an error in 1.4?

              Also: No host templates appear for my node.

              Comment

              • Alexei
                Founder, CEO
                Zabbix Certified Trainer
                Zabbix Certified SpecialistZabbix Certified Professional
                • Sep 2004
                • 5654

                #8
                Node A and B should work together. I'm not sure about setup of C as I see no NodeID and it is not clear if it is a slave node or a master one.
                Alexei Vladishev
                Creator of Zabbix, Product manager
                New York | Tokyo | Riga
                My Twitter

                Comment

                • Niels
                  Senior Member
                  • May 2007
                  • 239

                  #9
                  Originally posted by Alexei
                  Node A and B should work together.
                  That's good to know, because they don't.

                  Originally posted by Alexei
                  I'm not sure about setup of C as I see no NodeID and it is not clear if it is a slave node or a master one.
                  It's not a node, it's a machine I want to monitor. It only has an agent on it, which should report to machine B (node 2).

                  Thanks!

                  Comment

                  • Alexei
                    Founder, CEO
                    Zabbix Certified Trainer
                    Zabbix Certified SpecialistZabbix Certified Professional
                    • Sep 2004
                    • 5654

                    #10
                    I see. Anyway ZABBIX Server is supposed to drop messages about every sync with nearest nodes to the log file. This is strange you don't see these messages.
                    Alexei Vladishev
                    Creator of Zabbix, Product manager
                    New York | Tokyo | Riga
                    My Twitter

                    Comment

                    • Niels
                      Senior Member
                      • May 2007
                      • 239

                      #11
                      I don't have access to the logs right here, I'll check further tomorrow. Thanks again.

                      Comment

                      • Wido
                        Junior Member
                        • Mar 2006
                        • 23

                        #12
                        Hi, i don't want to open a new topic, so i'll hijack this one.

                        I just setup two servers, one with NodeID=1 (with frontend) and one with NodeID=2

                        According to the documentation there should be a configuration page for the distributed setup, but i can't find it!

                        I found a file called "nodes.php", but when i visit that page (as Super Admin) i get a permission denied.

                        I have bean searching for the distributed setup since 1.3.4, but i was never able to find it.

                        Who knows where to look?

                        Comment

                        • Niels
                          Senior Member
                          • May 2007
                          • 239

                          #13
                          As far as I know, you must run "zabbix_server -n 1" on the first server, and so on. That'll update the DB and the UI will show a node configuration page, under administration.

                          Comment

                          • Wido
                            Junior Member
                            • Mar 2006
                            • 23

                            #14
                            Originally posted by Niels
                            As far as I know, you must run "zabbix_server -n 1" on the first server, and so on. That'll update the DB and the UI will show a node configuration page, under administration.
                            Yes, that is correct.

                            I ran the command and it fixed it, but now there are new problems!

                            I setup the nodes, configured everything and i can switch nodes, but now comes the weird stuff.

                            First, the slave does not take over the data, it simply does not add anything to the database.

                            And then, the slave just disappear from the database! It happened 3 times today, my slave just vanished from the "Nodes" page and it is also gone from the database.

                            It is a test server on which i am working and i am the only one with access.

                            How is this possible?

                            Comment

                            • Niels
                              Senior Member
                              • May 2007
                              • 239

                              #15
                              Originally posted by Wido
                              First, the slave does not take over the data, it simply does not add anything to the database.
                              Yep, that's my problem exactly.

                              Originally posted by Wido
                              And then, the slave just disappear from the database! It happened 3 times today, my slave just vanished from the "Nodes" page and it is also gone from the database.
                              I have not seen that.

                              Originally posted by Wido
                              How is this possible?
                              With modern computers, anythings possible...

                              Comment

                              Working...