![](https://secure.gravatar.com/avatar/ddf13bba53d5bcb04f2102208eaf0984.jpg?s=120&d=mm&r=g)
On 2014-10-16 8:47 am, Darian Jimenez wrote:
Has anyone done a script where it can every 30 minutes or every hour read server names from a text file and add the device and discovery and poll it automatically ?
I want to be able to add servers into the domain and have observium discovery them automatically via snmp.
I've done something like this, regularly query our inventory management system and then check if the relevant devices exist in the Observium devices table.
if exists then skip; else ./add_device $hostname; end
This relies on you being able to generate DNS names from whatever system already knows about the device you need to add. If this is an inventory tracking system that might not be a field. If you're parsing zone files though it shouldn't be challenging at all.
I didn't try very hard to automate the other way though. If a device exists in Observium but not inventory management then it sends an email and I go and manually click delete.