Ad Widget

Collapse

wmi.get Issues

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • clahti
    Senior Member
    • Jan 2007
    • 126

    #1

    wmi.get Issues

    Hello all:

    I am trying to use wmi.get zabbix agent item key to get a registry value, and so far I have not been able to get this to work at all. Even the documented example in the Zabbix does not seem to work:

    Code:
    [root@zabbix conf.d]# zabbix_get -s ssi-eastern-04 -k wmi.get[root\cimv2,select status from Win32_DiskDrive where Name like '%PHYSICALDRIVE0%'] 
    ZBX_NOTSUPPORTED
    You have mail in /var/spool/mail/root
    [root@zabbix conf.d]# zabbix_get -s ssi-eastern-04 -k wmi.get["root\cimv2", "select status from Win32_DiskDrive where Name like '%PHYSICALDRIVE0%'"] 
    ZBX_NOTSUPPORTED
    Am I missing something here? Also it seems challenging to find an example of wmi.get that retrieves a registry value.
  • ingus.vilnis
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Mar 2014
    • 908

    #2
    Hi,

    I checked the provided examples and documentation as well.

    Your 1st example is not working because of missing quotes for item key parameters.

    Your 2nd example does not work because of blank space between 1st and 2nd item key parameter. Quotes are OK there.

    Code:
    [root@ingus-vm-10 ~]# zabbix_get -s 192.168.1.173 -k wmi.get["root\cimv2","select status from Win32_DiskDrive where Name like '%PHYSICALDRIVE0%'"]
    OK
    You can check some other basic keys that I have for tests.
    Code:
    wmi.get["root\cimv2","SELECT manufacturer FROM Win32_BIOS"]
    wmi.get["root\cimv2","SELECT serialnumber FROM Win32_BIOS"]
    Also WMIExplorer is a nice app that can help you to get and understand these queries. https://wmie.codeplex.com/

    Hope this helps!

    Best Regards,
    Ingus

    Comment

    • ingus.vilnis
      Senior Member
      Zabbix Certified Trainer
      Zabbix Certified SpecialistZabbix Certified Professional
      • Mar 2014
      • 908

      #3
      By the way, the item key without quotes works OK in frontend but does not work only with zabbix_get.

      Comment

      • clahti
        Senior Member
        • Jan 2007
        • 126

        #4
        thanks for your help, I will check this out.

        Comment

        Working...