Ad Widget

Collapse

Discovery by Proxy not working

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ElementZero
    Junior Member
    • Jan 2021
    • 16

    #1

    Discovery by Proxy not working

    I've set up a Discovery Rule to find hosts with an IP range of 10.1.1.1-254 and Discovery by proxy set to a proxy server in the data center. The rule runs every 10 minutes. I set up the agent on a machine I want monitored and set it to be able to be hit by the proxy and set active checks to the proxy. In the proxy log I see

    Code:
    cannot send list of active checks to "10.1.1.35": host [xxxxxx] not found
    because I have no configured the host (waiting for discovery to do that). I have set up a discovery action to do the following
    A Received value equals Windows Remove
    B Uptime/Downtime is greater than or equals 3600 Remove
    C Discovery status equals Up Remove
    D Service type equals Zabbix agent

    And then

    Operations
    Add to host groups: Discovered hosts, Windows Servers
    • Edit
    • Remove
    Link to templates: Windows services by Zabbix agent active
    • Edit
    • Remove
    Link to templates: Windows by Zabbix agent active, Windows CPU by Zabbix agent active, Windows filesystems by Zabbix agent active, Windows generic by Zabbix agent active, Windows memory by Zabbix agent active, Windows network by Zabbix agent active, Windows physical disks by Zabbix agent active

    but the server is not being found. I see nothing in the proxy log about it running discovery rules - should it? What am I missing here?

    Thanks in advance!
    Last edited by ElementZero; 19-01-2023, 23:46.
  • markosa
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Aug 2022
    • 104

    #2
    What kind of checks you have configured? I mean these: Click image for larger version

Name:	image.png
Views:	1266
Size:	40.3 KB
ID:	457929

    Comment

    • ElementZero
      Junior Member
      • Jan 2021
      • 16

      #3
      See below



      Click image for larger version

Name:	image.png
Views:	1216
Size:	50.0 KB
ID:	457982

      Comment

      • Markku
        Senior Member
        Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
        • Sep 2018
        • 1781

        #4
        Your discovery rule creates the host name as DNS name, and the agent is using its agent name.

        Change the discovery rule to set host name to the agent name.

        See also https://support.zabbix.com/browse/ZBX-22137. What is your Zabbix version?

        Markku

        Comment

        • ElementZero
          Junior Member
          • Jan 2021
          • 16

          #5
          Using Version Zabbix 6.2.2. I changed it to Host name: Zabbix agent "agent.host" but that didn't seem to resolve the issue. Not sure if there is a log I could see of why its not finding it? All I see in the log on the client is

          2023/02/07 12:08:39.592945 [101] no active checks on server [fc-zabbix-pxy:10051]: host [xxxxxx] not found
          Last edited by ElementZero; 07-02-2023, 19:10.

          Comment

          • Markku
            Senior Member
            Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
            • Sep 2018
            • 1781

            #6
            To be clear: during the first connect it is normal that the agent logs that error because there really isn't the host yet (see also: https://majornetwork.net/2022/10/zab...oregistration/). But do you see the error later as well, and your items don't work?

            Markku

            Comment

            • Markku
              Senior Member
              Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
              • Sep 2018
              • 1781

              #7
              One more thing: since you are using proxy (and pre-6.4), even though the host would be correctly discovered and created on the server, it can take some time for the proxy to get the host configuration from the server. See the ConfigFrequency option in https://www.zabbix.com/documentation...g/zabbix_proxy.

              Markku

              Comment

              • ElementZero
                Junior Member
                • Jan 2021
                • 16

                #8
                Correct, the discovery never seemingly picks up the server. I've waited DAYS and it still doesn't pick it up. FYI I have the ConfigFrequency on my proxy set to 300 (the default).

                I HAVE been able to get the servers set up by using auto-registration, but yeah discovery (at least by proxy) never seems to work. I only have it set to scan one subnet of 254 addresses and I have StartDiscovers=3. Again I'm unsure if there is any logs to look at so I'm not exaclty sure what is going wrong.

                Comment

                • ElementZero
                  Junior Member
                  • Jan 2021
                  • 16

                  #9
                  My concern also is that IF I use auto registration - that is fine for like Windows or Linux checks, but lets say later I install SQL Server and want to have discovery find that and start checks on it - if the discovery is not working then that won't do. It would force me to have to update the autoregistration, The discovery is one of the big reasons my company is interested in Zabbix as it could eliminate management configuration and just have Zabbix set itself up in a lot of cases.

                  Comment

                  • Markku
                    Senior Member
                    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
                    • Sep 2018
                    • 1781

                    #10
                    You can increase the logging level in the components to see what is happening.

                    You can upgrade to the latest 6.2.x and then open ticket on https://support.zabbix.com if you think everything is correctly configured and it still doesn't work.

                    I usually use the asset management system to populate Zabbix with whatever hosts+items I need.

                    Markku

                    Comment

                    • ElementZero
                      Junior Member
                      • Jan 2021
                      • 16

                      #11
                      hmm, I don't know how to do that. Do you have some documentation on how to use the asset management system to do that?

                      Thanks!

                      Comment

                      • Markku
                        Senior Member
                        Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
                        • Sep 2018
                        • 1781

                        #12
                        Sorry if I missed some facts but:
                        - have you verified that the proxy can connect to the agents on ports 10050-10055?
                        - how are your agents configured?

                        Markku

                        Comment

                        • Markku
                          Senior Member
                          Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
                          • Sep 2018
                          • 1781

                          #13
                          Originally posted by ElementZero
                          hmm, I don't know how to do that. Do you have some documentation on how to use the asset management system to do that?
                          i meant the usual system that you use when deploying servers in your environment, the system that contains your assets anyway or that pushes the configurations in the servers. I usually read the management data from there and then populate Zabbix using the API.

                          Markku

                          Comment

                          • ElementZero
                            Junior Member
                            • Jan 2021
                            • 16

                            #14
                            Also yes, I saw that you can do

                            zabbix_server --runtime-control log_level_increase=discoverer

                            but since I'm attempting to do it on the proxy would I be able to do something like this?

                            zabbix_proxy --runtime-control log_level_increase=discoverer

                            Comment

                            • ElementZero
                              Junior Member
                              • Jan 2021
                              • 16

                              #15
                              Originally posted by Markku
                              Sorry if I missed some facts but:
                              - have you verified that the proxy can connect to the agents on ports 10050-10055?
                              - how are your agents configured?

                              Markku
                              Well, I mean once I have the servers registered (whether I do it manually or use auto-registration) then the checks succeed using active checks. I haven't really tried passive

                              Comment

                              Working...