Ad Widget

Collapse

zbxwmi : agentless WMI monitoring

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jarne St
    Member
    • Sep 2019
    • 63

    #31
    I still get an acess denied error:
    (my host in zabbix is "JanrePC" and the IP adress "172.27.0.137")
    Code:
    sudo ./zbxwmi -a get -fields "FreeSpace" -item "C:" "Win32_LogicalDisk" "172.27.0.137"
    An error ocurred: prc_s_access_denied
    sudo ./zbxwmi -a get -fields "FreeSpace" -item "C:" "Win32_LogicalDisk" "JarnePC"
    An error ocurred: prc_s_access_denied
    Which type does the item "C:" in zabbix have to? Or does the Item "C:" not matter when you try to invoke it from the command line?



    Comment

    • dennistm
      Junior Member
      • Jul 2023
      • 7

      #32
      Hi all,

      I just started using zabbix this week. I want to use it mainly for SNMP and WMI hosts. Setting up WMI with the zabbix agent was pretty straighforward. However, I have some windows hosts on which I'm not allowed to install the agent, so I was looking for an agentless WMI solution. As far as I understand the only solution currently available is this 'zbxwmi WMI connector'. Even though the documentation seems somewhat outdated, I managed to set up the basics with the instructions provided in the git-readme, and I'm now able to query a host for information from the command line.

      Unfortunately I'm not yet able to make things work in zabbix. I'm on Oracle Linux 9, and Zabbix 6.4.4. I imported the 'OS Windows WMI'-template provided here, I added a windows host, and linked the template to the host. But now I'm stuck. All the items give me this error:

      Preprocessing failed for: usage: zbxwmi [-h] [-v] [-action {get,bulk,json,discover,both}]. [-namespace NAMESPA...
      1. Failed: cannot extract value from json by path "$[2].PercentProcessorTime": invalid object format, expected opening character '{' or '[' at: 'usage: zbxwmi [-h] [-v] [-action {get,bulk,json,discover,both}]
      [-namespace NAMESPACE] [-key KEY] [-fields FIELDS] [-type TYPE]
      [-filter FILTER] [-item ITEM] [-
      zz0.n34xcs65f4lzz


      I've tried many things, but I'm not able to solve the issue. I'm pretty sure nothing is wrong on the windows host, because I am able to query it with the 'check_wmi_plus'-script from nagios. One thing I'm not so sure of is if I set up the host correctly. I gave it a name and linked the template, but I don't know what to choose as an interface, or if I should choose one at all. Tried different ones, but switching between them didn't resolve my issue.

      I understand this topic is pretty old, but it's one of the few that is specifically about this plugin. Is there anyone that has zbxwmi working with zabbix, and is willing to help me solve my issue?

      Any help would be greatly appreciated!

      Thanks,
      Dennis

      Comment

      • dennistm
        Junior Member
        • Jul 2023
        • 7

        #33
        Nevermind. Fixed it by fiddling around with the key provided by the template

        Comment

        Working...