kingsxw / dell_warranty_zabbix

DELL warrany days Left monitoring for ZABBIX
1 stars 0 forks source link

can you share a dicovery rule example to pass on host.name & tag #2

Open jaipsharma opened 3 years ago

jaipsharma commented 3 years ago

In your discovery rule:

Host name = IP Address

Visible name = SNMPv2 agent "SNMPv2-MIB::sysName.0", like idrac-xxxxxxx in default.

So I send Visible name ({HOST.NAME}) to dell_info.sh and remove idrac- to get service tag via service_tag=$(echo $3| cut -d"-" -f2)

You can make changes to fit your case. For example get service tag directoty via snmpwalk -v2c -c COMMUNITY IDRAC_IP SNMPv2-MIB::sysName.0 and then cut -d"-" -f2

if you can help me, instead of SNMP using zabbix agent custom UserParameter

jaipsharma commented 3 years ago

I'm using a new value for service_tag=$(sudo dmidecode -t system|grep "Serial Number"|awk -F ":" '{print $2}' and not passing ({HOST.NAME}) in the key, hope this should work.