Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
Professional Edition
-
None
Description
when adding devices from the API, there doesn't seem to be a way to set a custom location. We've got lots of devices that don't support location-via-SNMP, so if I want to monitor them, I need to manually set the location through the web interface.
What I'd like to be able to do is add them like this:
root@srv:/home/observium/dev# curl -u user:pass http://localhost/api/v0/devices/ -H "Content-Type: application/json" -X POST -d '{"hostname":"localhost", "use_custom_location":"yes", "custom_location":"London, UK"}'
{"status":"ok","device_id":1}root@srv:/home/observium/dev#
Observium would add the device, and if this was successful, set the custom location toggle to on, and insert the custom location. This would then be handled in the usual way by discovery/polling.