Ad Widget

Collapse

Zabbix server not polling for UserParameter items.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dkoski
    Member
    • May 2016
    • 41

    #1

    Zabbix server not polling for UserParameter items.

    I have configured Zabbix agent on a Windows Server 2012 host with scripts to provide RAID status:

    UserParameter=areca_raid.discovery,C:\cygwin64\bin \bash.exe "C:\Program Files\Zabbix Agent\scripts-areca\areca-discover.sh" 2> nul
    UserParameter=areca_raid.state[*],C:\cygwin64\bin\bash.exe "C:\Program Files\Zabbix Agent\scripts-areca\areca-status.sh" $1 2> nul

    A template was added and the operation of the scripts was checked with zabbix_get from the server, for both discovery and state. All looks good so far. But the server never polls the agent. It is enabled. There is nothing in the logs for the server and agent to indicate an issue or that there was a query of the agent for specified items. ngrep was deployed over night revealing no queries for the same. And of course no data appears in the GUI, as if the configuration does not exist, even when "Show items without data" is enabled.

    Zabbix server and agent are 4.0.

    Regards,
    David
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    Hi David!

    If the two UserParameter lines you show are exact cut-and-paste from the zabbix_agentd.conf on the Windows 2012 server, then it looks like there's a space before the backslash for bash.exe with the first item.

    You said "a template was added"... I'm assuming that means you created a template and added items to that template for either areca_raid.discovery or areca_raid.state[some parameter here] ?

    Did you actually apply (link) that template to the Windows Server 2012 that has the UserParameters defined?

    If you browse to Configuration->Hosts in the web front end and find your Windows 2012 server in the list, and click the "items" link for that server, do the areca_raid* items from the template show up as items for that host?

    Comment

    • dkoski
      Member
      • May 2016
      • 41

      #3
      Re: UserParameter line with spaces.
      Good catch. But the original file is correct. I can't explain how the space got there while posting here.

      Re: Template was added.
      Yes, it was created by exporting a working, similar one and modifying it with little change.

      Re: Did you apply link.
      Yes. The host configuration has templates for Windows agent, Windows logging and Areca RAID.

      Re: If you browse to Configuration...
      The items are not listed as discovery does not appear to be executing. When browsing Discovery rules instead of Items (Hosts -> <name> -> Discovery rules), the Areca RAID discovery is listed and if further, there is one item prototype under discovery as expected. It appears that discovery for Areca RAID is not executed.

      Thank you for your input.
      David

      Comment

      • LenR
        Senior Member
        • Sep 2009
        • 1005

        #4
        Is the "2> nul" correct? Shouldn't it be "2 > /dev/nul"?

        Check for errors in the agent log and make sure the log level is high enough.

        Comment

        • dkoski
          Member
          • May 2016
          • 41

          #5
          It is Windows agent so "2> nul" is correct. This works perfectly using zabbix_get from the server. Nothing interesting in the agent log.

          Thanks!

          Comment

          • dkoski
            Member
            • May 2016
            • 41

            #6
            The "Update interval" of the discovery rule is 15m.

            Thanks!

            Comment

            • Eddie7100
              Junior Member
              • Oct 2021
              • 1

              #7
              Originally posted by dkoski
              I have configured Zabbix agent on a Windows Server 2012 host with scripts to provide RAID status:

              UserParameter=areca_raid.discovery,C:\cygwin64\bin \bash.exe "C:\Program Files\Zabbix Agent\scripts-areca\areca-discover.sh" 2> nul
              UserParameter=areca_raid.state[*],C:\cygwin64\bin\bash.exe "C:\Program Files\Zabbix Agent\scripts-areca\areca-status.sh" $1 2> nul

              A template was added and the operation of the scripts was checked with zabbix_get from the server, for both discovery and state. All looks good so far. But the server never polls the agent. It is enabled. There is nothing in the logs for the server and agentjcpenneykiosk to indicate an issue or that there was a query of the agent for specified items. ngrep was deployed over night revealing no queries for the same. And of course no data appears in the GUI, as if the configuration does not exist, even when "Show items without data" is enabled.

              Zabbix server and agent are 4.0.

              Regards,
              David


              Did you have a fix on this issue? Facing same issue but no response from anyone.
              Last edited by Eddie7100; 04-10-2021, 06:52. Reason: Spelling Mistake

              Comment

              • dkoski
                Member
                • May 2016
                • 41

                #8
                Re: "Did you have a fix on this issue? Facing same issue but no response from anyone."

                No resolution yet.

                Comment

                • dkoski
                  Member
                  • May 2016
                  • 41

                  #9
                  I can observe discovery events using ngrep but they are not followed up with any data retrievals. Item interval is set at 600. No evidence in the GUI of data or discovery.

                  Comment

                  • dkoski
                    Member
                    • May 2016
                    • 41

                    #10
                    Anyone have any ideas?

                    Comment

                    • dkoski
                      Member
                      • May 2016
                      • 41

                      #11
                      On closer examination, I found the filter in the template did not match the string provided in discovery. That would explain why no items were logged. I have not waited long enough to verify the data will populate but if it doesn't, I will report back.

                      Thank you all for your input.

                      Comment

                      • dkoski
                        Member
                        • May 2016
                        • 41

                        #12
                        What I am observing with ngrep as I verify the data retrieval is bizarre but consistent with previous observations. Zabbix seems unpredictable in some ways. After unlinking and clearing the template, the first action from the Zabbix server was to request data (RAID state) followed by a discovery request. Ok, I'll let that slide. But six minutes later, there was another discovery request. Of course the first request for data was not posted as it was before discovery. Note that discovery interval was set at 1200 and data at 300, for testing. Further transactions were observed and data appears to no be collected and presented normally.

                        Comment

                        • dkoski
                          Member
                          • May 2016
                          • 41

                          #13
                          One more thing I found that can cause similar symptoms is if you are running an agent on Windows, to get my Cygwin bash scripts to run I have had to run the agent service as Administrator.

                          Comment

                          Working...