Hello,
I have to parse a file (let's say results.txt) like this :
element1, element2 and element3 are already knwown by Zabbix by a Discovery.
I've made a shell script (parse.sh) like this :
If I call this script like this :
sh parse.sh element1
The result is 10000 etc... and this is what I want to do with Zabbix.
I want Zabbix get the values contained in the txt file by using the script and to be able to pass arguments(Discovers elements) to this script to get the correct value.
I really don't know in wich direction to go.
Could someone help ?
Thanks in advance
Nicolas
I have to parse a file (let's say results.txt) like this :
Code:
element1 10000 element2 2403900 element3 698400
I've made a shell script (parse.sh) like this :
Code:
#!/bin/sh
cat result.txt | grep $1 | awk '{print $2}'
sh parse.sh element1
The result is 10000 etc... and this is what I want to do with Zabbix.
I want Zabbix get the values contained in the txt file by using the script and to be able to pass arguments(Discovers elements) to this script to get the correct value.
I really don't know in wich direction to go.
Could someone help ?
Thanks in advance
Nicolas

Comment