Ad Widget

Collapse

Using discovery rules

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cedric.monichon
    Junior Member
    • Feb 2014
    • 3

    #1

    Using discovery rules

    Hello !

    I'm new in zabbix, and i have some questions about using discovery rules...
    My server Zabbix runs on RedHat and i've an agent running on AIX server.

    I'd like to use discovery rule to get the list of the physical volumes attached on my aix server.
    I've already created a userparameter in the agent conf file, returning that :

    {
    "data":[
    { "{#PVNAME}":"hdisk0" },
    { "{#PVNAME}":"hdisk1" },
    { "{#PVNAME}":"hdisk2" },
    { "{#PVNAME}":"hdisk3" },
    { "{#PVNAME}":"hdisk4" },
    { "{#PVNAME}":"hdisk5" },
    { "{#PVNAME}":"hdisk6" },
    { "{#PVNAME}":"hdisk7" }
    ]
    }

    What should i do on the zabbix server to make it functional ?

    Thanks a lot for helping a newbie
  • steveboyson
    Senior Member
    • Jul 2013
    • 582

    #2
    Just define item prototypes. At the position where your key (script?) expects the volume name, use {#PVNAME} instead.

    Comment

    • cedric.monichon
      Junior Member
      • Feb 2014
      • 3

      #3
      Hum !

      Hello and thanks for your reply...

      I've tried to create a discovery rule, with key "lspv" (the key in the userparameter line in my aix server zabbix conf file).

      Inside, i've created an item prototype, with the key : system.run[bootinfo -s #PVNAME] to have the size of eache pv on my aix server.

      But when i go to the host discovery panel, the discovery rule is flagged "Not supported by zabbix agent"

      What's wrong ?

      Thanks for your help

      Comment

      • steveboyson
        Senior Member
        • Jul 2013
        • 582

        #4
        Which zabbix release? LLD is supported from 2.0.x afterwards ...

        The key in the item prototype has to be {#PVNAME} (mind the curly brackets)
        reading:
        Code:
        system.run[bootinfo -s {#PVNAME}]
        For that to work, you need to have "EnableRemoteCommands=1" in your zabbix-agentd.conf. I would strongly suggest to avoid that.

        Rather have an additional "UserParameter" which reads
        Code:
        UserParameter=check-pv[*],bootinfo -s $1
        Your item prototype's key param then reads:
        Code:
        check-pv[{#PVNAME}]
        and would be of type "zabbix agent" or "zabbix agent (active)"
        Last edited by steveboyson; 02-03-2014, 22:19.

        Comment

        Working...