Thanks David. Yea I ask because i don't know much about Linux and cron jobs.
I did the discovery and polling with the new argument for host the other day and it didn't pick up the host I had added .
Also know how to set a timer on the cron job?
Sent from my iPhone
On Oct 16, 2014, at 6:16 AM, David Hulth david.hulth@proceranetworks.com wrote:
Hello
If you run ./add_device.php <file> and file contains a bunch of hostnames where several already exists in observium, they will be skipped.
No need to create a script for that, just add it to cron with your other observium-jobs. Ours looks like this: */8 * * * * root /var/www/add_device.php lab_devices && /var/www/discovery.php -h new >> /dev/null 2>&1
Might not be best-practice, but it works nice :)
David Hulth Lab Technician Procera Networks AB
On 10/16/2014 11:55 AM, Darian Jimenez wrote: Cameron,
Do you mind sharing this?
I can generate DNS names from active directory via powershell
Sent from my iPhone
On Oct 15, 2014, at 11:20 PM, Cameron Daniel cdaniel@nurve.com.au wrote:
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.
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium