Ad Widget

Collapse

Create new userparam

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SaXior
    Junior Member
    • Sep 2015
    • 2

    #1

    Create new userparam

    Hello.
    In my zabbix_agentd.conf, I write one line:
    UserParameter=raid.virtual_degraded, /opt/MegaRAID/CmdTool2/CmdTool264 -AdpAllInfo -aALL | sed -n '/Device Present/,/^$/p' | grep 'Degraded' | cut -d ':' -f 2
    when I run commend in cli:
    /opt/MegaRAID/CmdTool2/CmdTool264 -AdpAllInfo -aALL | sed -n '/Device Present/,/^$/p' | grep 'Degraded' | cut -d ':' -f 2
    the result is 0, so the commend work properly.
    Next, create new item:
    Type: zabbix agent
    key: raid.virtual_degraded
    Type of information: numeric
    Data type: decimal
    When run commend:
    zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf -p
    the result is:
    raid.virtual_degraded [t| 0]
    In /var/log/zabbix/zabbix-server.log:
    "Zabbix server:raid.virtual_degraded" became not supported: Received value [] is not suitable for value type [Numeric (unsigned)] and data type [Decimal]
    What is wrong?
  • Colttt
    Senior Member
    Zabbix Certified Specialist
    • Mar 2009
    • 878

    #2
    on you zabbix server, please try:
    Code:
    zabbix get -s <IP_from_Agent> -k raid.virtual_degraded
    did you get a correct answer? if not please use

    Code:
    UserParameter=raid.virtual_degraded, /opt/MegaRAID/CmdTool2/CmdTool264 -AdpAllInfo -aALL | sed -n '/Device Present/,/^$$/p' | grep 'Degraded' | cut -d ':' -f 2
    or
    Code:
    UserParameter=raid.virtual_degraded, /opt/MegaRAID/CmdTool2/CmdTool264 -AdpAllInfo -aALL | sed -n '/Device Present/,/^$$$/p' | grep 'Degraded' | cut -d ':' -f 2
    sometime its something wrong with $
    Debian-User

    Sorry for my bad english

    Comment

    Working...