David,

Thanks! I do have the cron jobs setup from the guide. Yea I am passing the file name to the add_device.php only. The other two php (discovery & poller) I just use the -h new.

On Thu, Oct 16, 2014 at 11:16 AM, David Hulth <david.hulth@proceranetworks.com> wrote:
Hi,

If I remember correctly, you can't pass a file as argument to discovery.php or poller(-wrapper).php, but only to add_device.php.
As with any other host you're trying to add to Observium you have to make sure that the host running Observium can resolve the hostname or it will fail when trying to add.

You should already have a cronjob in place for discovery and polling, assuming you've followed the debian install instructions available on the Observium webpage.
My line below is in addition to the lines from the install instructions.

If you want to change the "timers" on the cron, an easy way for a beginner (this includes me :P) is to use http://www.crontab-generator.org/

David Hulth
Lab Technician
Procera Networks AB

On 10/16/2014 01:04 PM, Darian Jimenez wrote:
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
_______________________________________________
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