Ad Widget

Collapse

zbxwmi : agentless WMI monitoring

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • michael.weber
    Senior Member
    • Nov 2015
    • 121

    #16
    please check the external script Directory if there the script "zbxwmi" is located.

    Code:
    root@ste-s-***:/# find / -iname externalscripts
    [B]/usr/local/share/zabbix/externalscripts[/B]

    Comment

    • vlam
      Senior Member
      Zabbix Certified Specialist
      • Jun 2009
      • 166

      #17
      I still have the same error

      Here is the output:

      [root@zabbpr00 /]# find / -iname externalscripts
      /usr/lib/zabbix/externalscripts
      [root@zabbpr00 /]#


      But still when I try to test I get

      ERROR:root:An error occured with wmic : [Errno 2] No such file or directory
      An error occured with wmic.


      My script is in the correct place

      root@zabbpr00 externalscripts]# pwd ; ll -h
      /usr/lib/zabbix/externalscripts
      total 8.0K
      -rwxr-xr-x. 1 zabbix zabbix 5.7K Dec 28 07:49 zbxwmi
      [root@zabbpr00 externalscripts]#

      Any ideas
      4 Zabbix Frontend Servers (Load balanced)
      2 Zabbix App Servers (HA)
      2 Zabbix Database Servers (HA)
      18 Zabbix Proxy Servers (HA)
      3897 Deployed Zabbix Agents
      6161 Values per second
      X-Layer Integration
      Jaspersoft report Servers (HA)

      Comment

      • vlam
        Senior Member
        Zabbix Certified Specialist
        • Jun 2009
        • 166

        #18
        Ok

        Got it working on the environment. I have started to create an indept template to something like what you get in Scom and Mom and Sourcing monitoring tools but I am struggling abit with the Discovery rules.
        Has anyone created a basic teplate that includes Storage, Network, Services, Processes and eventlogs as those are the components that I still need.

        Any help would be greatly appreciated.

        Thanks
        4 Zabbix Frontend Servers (Load balanced)
        2 Zabbix App Servers (HA)
        2 Zabbix Database Servers (HA)
        18 Zabbix Proxy Servers (HA)
        3897 Deployed Zabbix Agents
        6161 Values per second
        X-Layer Integration
        Jaspersoft report Servers (HA)

        Comment

        • michael.weber
          Senior Member
          • Nov 2015
          • 121

          #19
          Glad to hear that you were successful

          Unfortunaly i dont have any of these. i did not investigate more time in zbxwmi
          if there were new interesting template i would be happy to test them, too!

          Comment

          • vlam
            Senior Member
            Zabbix Certified Specialist
            • Jun 2009
            • 166

            #20
            I Need some help with my Storage and Network Discovery rules

            My Storage Discovery Rule looks as follow:

            zbxwmi["-a","discover","-h","{HOST.IP}","-k","Name","-i","Name,Size,FreeSpace","-c","Win32_LogicalDisk","-f","MediaType = 12"]

            My Storage Discovery Item looks as follow:

            FreeSpace[{#WMI.NAME}]
            Size[{#WMI.NAME}]

            My Network Discovery Rule Looks as follow:

            zbxwmi["-h","{HOST.IP}","-k","Name","-i","Name,NetworkAdapter","-c","Win32_NetworkAdapter","-f","MediaType = 12"]

            My Network Discovery Item looks as follow:

            BytesRecievedPersec[{#WMI.NAME}]
            BytesTransmittedPersec[{#WMI.NAME}]
            BytesTotalPersec[{#WMI.NAME}]

            Any advise or help would be greatly appreciated

            Thanks
            4 Zabbix Frontend Servers (Load balanced)
            2 Zabbix App Servers (HA)
            2 Zabbix Database Servers (HA)
            18 Zabbix Proxy Servers (HA)
            3897 Deployed Zabbix Agents
            6161 Values per second
            X-Layer Integration
            Jaspersoft report Servers (HA)

            Comment

            • dmayorgap
              Junior Member
              • Sep 2016
              • 9

              #21
              Hi!, i have am issue with zbxwmi template, i can collect data from StartMode item but i have no data from Started item, although i can collect it from CLI, help!

              Thanks

              Regards,

              David M.

              Comment

              • dmayorgap
                Junior Member
                • Sep 2016
                • 9

                #22
                Hi, i have an issue with zbxwmi, maybe someone can give me a hint of whats happening.

                When i run this commando via CLI it returns a correct value:

                ./zbxwmi 10.2.0.233 Started DisplayName Win32_Service -f "DisplayName = 'ISIM Active Directory Adapter'" -D [domain] -U [user] -P [password]

                Result:

                {
                "data": [
                {
                "{#WMIINDEX0}": true
                }
                ]
                }


                But in "latest data" menu i dont get any value, although the same command is configured in my item (I've attached the image)
                Last edited by dmayorgap; 26-10-2016, 21:04.

                Comment

                • rafaelrohden
                  Junior Member
                  • Jun 2017
                  • 3

                  #23
                  I found this post today.
                  I've been installing and configuring environment to run the script all day, and I did it .

                  Many thanks for sharing.

                  However the microsoft website is too bad to find good documentation on WMI. I even found it, but it's not easy to find the classes and items and their descriptions.

                  Has anyone done any WMI template with this script?

                  Comment

                  • rafaelrohden
                    Junior Member
                    • Jun 2017
                    • 3

                    #24
                    I was looking for WMI documentation and found this software.

                    WMI Code Creator v1.0
                    The WMI Code Creator tool allows you to generate VBScript, C#, and VB .NET code that uses WMI to complete a management task such as querying for management data, executing a method from a WMI class, or receiving event notifications using WMI.


                    With it it is possible to discover all available classes, what is the meaning of each iten, and it is still possible to execute a sample code to see the return of each class.

                    I'm building a WMI template for Zabbix.
                    But if anyone has already done this, please let us know.

                    Comment

                    • c.reddy@diyarme.com
                      Junior Member
                      • Feb 2018
                      • 2

                      #25
                      Hi All,

                      I have configured a discovery as mentioned above and created item prototypes with macro {#WMI.NAME} I can see the item created but no values for the items. I didn't find any error in zabbix_server.log for this. please help me to fix this issue.
                      Attached Files

                      Comment

                      • rafaelrohden
                        Junior Member
                        • Jun 2017
                        • 3

                        #26
                        Hello
                        See attached file.
                        I created a template and exported it.
                        The zabbix version I use is 3.0.4

                        Some things with WMI do not work the right way.
                        Some items do not load properly.
                        So I gave up on using it. But I did not do much research, so if you figure out a better way to use WMI with Zabbix, please tell me.
                        Attached Files

                        Comment

                        • c.reddy@diyarme.com
                          Junior Member
                          • Feb 2018
                          • 2

                          #27
                          Hi rafaelrohden,

                          Thanks for the template but no luck I am not able to fetch values for items discovered.

                          I am using zbxwmi script with zabbix 3.4 I see no errors and everything looks fine but no values for discovered items.

                          If anyone used zbxwmi script with zabbix 3.4 and succeeded please help me to resolve my issue.

                          Thanks in advance.

                          Comment

                          • corsario28
                            Junior Member
                            • Apr 2019
                            • 1

                            #28
                            Do we have a better documentation on zbxwmi ? So far clues are spread everywhere and not clear, not even in zbxwmi git page (last example, create discovery and then prototyping -this is unclear-)

                            Comment

                          • Jarne St
                            Member
                            • Sep 2019
                            • 63

                            #29
                            Hello,
                            I also struggle with the zbxwmi script: https://github.com/13hakta/zbxwmi/issues/7

                            Can someone explain how the wmi.pw file should look like?

                            And how can you verify that impacket library is correctly configured?

                            Comment

                            • 13hakta
                              Junior Member
                              • Aug 2019
                              • 3

                              #30
                              Originally posted by Jarne St
                              Hello,
                              I also struggle with the zbxwmi script: https://github.com/13hakta/zbxwmi/issues/7

                              Can someone explain how the wmi.pw file should look like?

                              And how can you verify that impacket library is correctly configured?
                              First line login, second password.

                              Example:

                              Code:
                              mydomain\specialuser
                              ultrapassword

                              Comment

                              Working...