Hi all,
I'm building a template for monitoring a Pure Storage Array and I'm having some issues.
I've built a number of similar templates using LLD successfully, so I really have tried hard to get this working.
The script I'm using is view-able here: http://pastebin.com/u5jTBgdM
It would be executed as follows to discover temperature metrics:
I know the script works as I've tested it manually, also confirmed the JSON on http://jsonlint.com/:
The Discovery item is as follows:
{$APITOKEN} is a macro within the host.
I have one Item prototype called:
With a key of:
If I manually add a regular item with an ID which I know exists, for example:
This item works correctly proving the API token etc.
But for some reason discovery is failing and items are not created:
I've increased Discovery debug to 5 but there is nothing relating to this item which shows up.
Any advice on where to look next (unless it's obvious what I'm doing wrong!)?
Thanks in advance,
Sean
I'm building a template for monitoring a Pure Storage Array and I'm having some issues.
I've built a number of similar templates using LLD successfully, so I really have tried hard to get this working.
The script I'm using is view-able here: http://pastebin.com/u5jTBgdM
It would be executed as follows to discover temperature metrics:
Code:
PureStorageMonitoring.py [IP_ADDRESS] [API_TOKEN] discoverytemp
Code:
{"data": [{"NAME": "CT0.TMP0", "ID": "CT0.TMP0"}, {"NAME": "CT0.TMP1", "ID": "CT0.TMP1"}, {"NAME": "CT0.TMP12", "ID": "CT0.TMP12"}, {"NAME": "CT0.TMP14", "ID": "CT0.TMP14"},.........{"NAME": "CT1.TMP8", "ID": "CT1.TMP8"}]}
Code:
PureStorageMonitoring.py[{HOST.CONN},{$APITOKEN},"discoverytemp"]
I have one Item prototype called:
Code:
Temperature for {#NAME}
Code:
PureStorageMonitoring.py[{HOST.CONN},{$APITOKEN},"temperature",{#ID}]
Code:
PureStorageMonitoring.py[{HOST.CONN},{$APITOKEN},"temperature",CT1.TMP8]
But for some reason discovery is failing and items are not created:
Code:
Cannot create item: item with the same key "PureStorageMonitoring.py[{HOST.CONN},{$APITOKEN},"temperature",{#ID}]" already exists.
Cannot create item: item with the same key "PureStorageMonitoring.py[{HOST.CONN},{$APITOKEN},"temperature",{#ID}]" already exists.
Cannot create item: item with the same key "PureStorageMonitoring.py[{HOST.CONN},{$APITOKEN},"temperature",{#ID}]" already exists.
Any advice on where to look next (unless it's obvious what I'm doing wrong!)?
Thanks in advance,
Sean
Comment