Ad Widget

Collapse

Craeate new Item for Linux

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • CyberGuy
    Junior Member
    • Oct 2022
    • 1

    #1

    Craeate new Item for Linux

    Hi Guys!

    I am new in monitoring concept of zabbix.

    I have question which is bothering since few days when I read the documentation, If I understood topic Of Templates and Items withing the triggers right. Means I would like to create my own item which will show 2 things from Linux OS.
    Is the power supply presents and power

    HTML Code:
    #!/bin/bash
    
    SAFE=$(dmidecode --type 39 | grep -E "Status:.*\n")
    PSU_TOTAL=$(echo "$SAFE" | wc -l)
    PSU_PRESENT=$(echo "$SAFE" | grep -E -i -c "Present")
    
    echo -e $PSU_PRESENT" / "$PSU_TOTAL

    HTML Code:
    #!/bin/bash
    
    safe=$(dmidecode --type chassis | grep "Power Supply State: Safe")
    if [[ "$safe" == *"Power Supply State: Safe"* ]]; then
            echo 'safe'
    else
            echo 'no safe'
    fi
    
    ​
    I do not want to use it as scripts but add it to Linux template as item and trigger when the value is not specific base on the item type.
    Why I want to add it, I took over the zabbix monitoring and I found that that IPMI SNMP of supermicro do not send any problems when power supply fails, which was huge suprise for me and in that case I can check it using dmidecode from OS level not IPMI because is Linux machine, Later still looking how to properly do it

    Please let me know what do you think guys, any potential tips about it?

    best regards,

    Patryk
Working...