Ad Widget

Collapse

PATCH: Allow use of server Hostname or IP in agent config

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • James Wells
    Senior Member
    • Jun 2005
    • 664

    #1

    PATCH: Allow use of server Hostname or IP in agent config

    Greetings,

    This patch was originally contributed by Simon Matter, I have simply updated it and migrated it to work under the Zabbix 1.1

    The intention of this patch is to allow the use of either the IP or hostname of the server in the zabix_agentd.conf file. Presently, when you set the Server entry, it requires and will only process IP addresses. This makes can make it difficult to manage large or dynmic networks. Additionally, this patch will move the system one step closer to supporting multiple zabbix servers against a single database.

    EDIT: This patch is upgraded to support 1.1Beta1 and is against the latests CVS repository at time of submission.

    EDIT: Code is attached as file.
    Last edited by James Wells; 01-09-2005, 05:57.
    Unofficial Zabbix Developer
  • sauron
    Senior Member
    • Jan 2005
    • 215

    #2
    You can compress & attach patches ?

    Comment

    • James Wells
      Senior Member
      • Jun 2005
      • 664

      #3
      LOL!!! Finally figured out how to attach files. DOH!!!
      Attached Files
      Unofficial Zabbix Developer

      Comment

      • axel
        Member
        • Aug 2005
        • 36

        #4
        hi again

        ok i edit my includes/security.c with the changes.
        Than i recompile it with ./configure --enable-agent --prefix=/..../...

        now i start the new agentd again but i have the same Problem

        do i miss something ?

        Comment

        • James Wells
          Senior Member
          • Jun 2005
          • 664

          #5
          What is the problem you are having?
          Unofficial Zabbix Developer

          Comment

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

            #6
            May I ask you to send me patched file security.c. Memory is not allocated for variable sname, it makes me worry about the whole patch.
            Alexei Vladishev
            Creator of Zabbix, Product manager
            New York | Tokyo | Riga
            My Twitter

            Comment

            • James Wells
              Senior Member
              • Jun 2005
              • 664

              #7
              Ummm. Yeah, not really sure what happened, but the patch that is attached here is definately broken. I am in the process of re-creating the patch against the newest CVS branch, but I am also going to attach the corrected patch against Zabbix-1.1alpha12 as well as the patched security.c from Zabbix-1.1alpha12.
              Attached Files
              Unofficial Zabbix Developer

              Comment

              • James Wells
                Senior Member
                • Jun 2005
                • 664

                #8
                Okay, I had forgotten about this one. Anyway, I was a dufus and forgot to update the header files when Alexei moved security.c which was causing it to fail to compile. Here is the corrected patch against the latest CVS.
                Attached Files
                Unofficial Zabbix Developer

                Comment

                • razorgt
                  Junior Member
                  • Sep 2005
                  • 21

                  #9
                  I am new to zabbix. What is the best way to apply this patch?

                  Thanks for the understanding, I am kind of a newb.

                  Glenn

                  Comment

                  • James Wells
                    Senior Member
                    • Jun 2005
                    • 664

                    #10
                    Go into the parent directory of your zabbix source tree, and use the command 'patch -p0 < zabbix-1.1beta3-ServerByName.patch.txt' Then cd into the Zabbix directory and re-run the make.

                    Please note that this is actually in the mainline for the 1.1beta3 release, so if you want wait for 1.1bet3 release, the patching will be taken care of for you.
                    Unofficial Zabbix Developer

                    Comment

                    • razorgt
                      Junior Member
                      • Sep 2005
                      • 21

                      #11
                      I applied the patch, no errors "patched security.c" Did a make to rebuild everything, re-ran zabbix_server. It still can't communicate with my windows boxes using my server as the hostname, only the IP works. I have my hostname setup through DNS, I can communicate with that hostname from my windows boxes. Any idea what the problem could be?

                      Glenn

                      Comment

                      • James Wells
                        Senior Member
                        • Jun 2005
                        • 664

                        #12
                        Unfortunately, the zabbixW32 version does not use the security.c file from what I understand, and my patch does not extend the functionality to it, only to the Unix / Linux versions.
                        Unofficial Zabbix Developer

                        Comment

                        Working...