Forum Discussion

JamesH's avatar
7 years ago

REST API: API to validate SNMP String/Credentials etc

Currently, when adding a device via the REST API.  You don't get any feedback on if the entered properties (SNMP String, ESX UserID/Pass, etc) were correct.  Something similar to the feedback you get when using the wizard would be good enough.

This could be a separate API route that just provides testing.  POST request that selects a collector, type of device, and credentials.  Response could provide information like ping-ability, IP if DNS name was provided, credential response, etc.

Thanks!

4 Replies

Replies have been turned off for this discussion
  • Hey James,

    Another way to do this might be with a property source. If you take a look at a href="https://communities.logicmonitor.com/topic/1371-using-propertysources-for-reporting/" rel="">this article in the 'From the Front' forum you could do something like create the  'snmp.working=' tag that would then automatically populate once AD runs. This would then allow you to validate based on monitored protocol rather than asset type.  The WMI example is pretty easily modified (pull something like winders version) to create a  'wmi.working=' to catch that as well. 

    Cheers!

  • One idea is to use the API to retrieve one or more properties like system.sysinfo. If that has a value, then it has been 'detected' (i.e. your credentials are correct).

  • Thats not a bad idea..  and flag devices that don't have system.sysinfo populated (if its more than just a PING monitor).

    Thanks!

  • For anyone else trying this.  It would have to be different per device type.   ESX hosts doesn't have a sysinfo field.   But this will still work.