Hi,
I am trying to figure out how to create correct item prototype with discovery rule.
My data is a CSV outputted by " dhcpd-pools " to monitor DHCPD Pools data and then I transform that data to JSON with pre-processing ( CSV to JSON ) since I have an old version of dhcpd-pools that don't support JSON output.
My JSON look like this;
[{"shared net name":"occam_laba_1","first ip":"472","last ip":"418","max":"88.559","cur":"54","percent":"4 72 ","touch":"100.000","t+c":"","t+c perc":""},{"shared net name":"occam_lcet_1","first ip":"1728","last ip":"1621","max":"93.808","cur":"107","percent": "1 728","touch":"100.000","t+c":"","t+c perc":""},{"shared net name":"occam_lcet_2","first ip":"1250","last ip":"1184","max":"94.720","cur":"66","percent":" 12 50","touch":"100.000","t+c":"","t+c perc":""},{"shared net name":"adtran_lcet_1","first ip":"250","last ip":"108","max":"43.200","cur":"87","percent":"1 95 ","touch":"78.000","t+c":"","t+c perc":""},{"shared net name":"occam_bcvl_1","first ip":"1757","last ip":"1150","max":"65.452","cur":"607","percent": "1 757","touch":"100.000","t+c":"","t+c perc":""}]
How can I then use this JSON to create items ( first ip, last ip, max, cur, percent, touch ) for each " shared net name " automatically ?
* Don't mind the column name vs data, the column name don't find but will be easy to just map data at the right place anyway ...
I am trying to figure out how to create correct item prototype with discovery rule.
My data is a CSV outputted by " dhcpd-pools " to monitor DHCPD Pools data and then I transform that data to JSON with pre-processing ( CSV to JSON ) since I have an old version of dhcpd-pools that don't support JSON output.
My JSON look like this;
[{"shared net name":"occam_laba_1","first ip":"472","last ip":"418","max":"88.559","cur":"54","percent":"4 72 ","touch":"100.000","t+c":"","t+c perc":""},{"shared net name":"occam_lcet_1","first ip":"1728","last ip":"1621","max":"93.808","cur":"107","percent": "1 728","touch":"100.000","t+c":"","t+c perc":""},{"shared net name":"occam_lcet_2","first ip":"1250","last ip":"1184","max":"94.720","cur":"66","percent":" 12 50","touch":"100.000","t+c":"","t+c perc":""},{"shared net name":"adtran_lcet_1","first ip":"250","last ip":"108","max":"43.200","cur":"87","percent":"1 95 ","touch":"78.000","t+c":"","t+c perc":""},{"shared net name":"occam_bcvl_1","first ip":"1757","last ip":"1150","max":"65.452","cur":"607","percent": "1 757","touch":"100.000","t+c":"","t+c perc":""}]
How can I then use this JSON to create items ( first ip, last ip, max, cur, percent, touch ) for each " shared net name " automatically ?
* Don't mind the column name vs data, the column name don't find but will be easy to just map data at the right place anyway ...
Comment