Hello
I launched myself in the full rebuild of an snmp plugin for huawei dorado (san storage) by using Rest API.
I did this because I added a “lun” mode to the existing snmp plugin, but as it happens, if you have too many luns the snmp is getting lots timeout, the table is huge and when go over 50 lun/snapshot the plugin never give the information back…
after a bit of digging, I found there is a Restful api, and lot more digging I managed to create my own custom api
I have an issue with the thing I coded, I cannot get critical or warning alerts when I use for example “--critical-usage-prct=50” on the perfdata
here is the plugin, work in progress : centreon-plugins/luns.pm at master · christophe-activiumid/centreon-plugins (github.com) (btw, anyone feel free to test it in command line if you have a dorado, it needs a read only account, and work for dorado v6 and v5)
everything work fine, except threshold...
I do need to implement a cache/statefile on this specific lun mode because with the api and more than 50 lun I need to throttle a bit the api call, so I’ll use a statefile with a few minutes of lifetime (because I have 1 check per lun, I don’t like a global check. it works, but graphs and alert are unmanageable imo)
but as I said, all the --critical-* and --warning-* thresholds are not working and I’m having trouble understanding why when I compare to other plugin using these kind of thresholds
when I say they don’t work : I always get “OK”, if I try a --critical-zorglub it says the argument is unkwown, so that’s fine, but when I put the right argument name, it’s not using the value to make an alert, for example
“--critical-usage-prct=50” on a lun capcity used at 60%
(I tried >50 or 50% or >50% in the value, didn’t work better)
if a centreon dev can help me for what I could have missed when creating the mode, that would be great.
best regards,
Christophe