I have this for a quick way to ignore devices
cat toggle_ignore_device.sh #!/bin/bash # sed 'N;s/\n/ /' echo 'SELECT `ignore` FROM `devices` WHERE `hostname` = "'$1'";' | mysql --user=observium --password=notmypassword observium | awk 'NR%2{printf $0" ";next;}1' echo 'UPDATE `devices` SET `ignore` = NOT `ignore` WHERE `hostname` = "'$1'";' | mysql --user=observium --password=obs3rv1um observium echo 'SELECT `ignore` FROM `devices` WHERE `hostname` = "'$1'";' | mysql --user=observium --password=notmypassword observium | awk 'NR%2{printf $0" ";next;}1'
so we should be able to extend it to something like echo 'SELECT `location` FROM `devices` WHERE `hostname` = "'$1'";' | mysql --user=observium --password=notmypassword observium | awk 'NR%2{printf $0" ";next;}1' echo 'UPDATE `devices` SET `location` = "'$2'" WHERE `hostname` = "'$1'";' | mysql --user=observium --password=obs3rv1um observium echo 'SELECT `location` FROM `devices` WHERE `hostname` = "'$1'";' | mysql --user=observium --password=notmypassword observium | awk 'NR%2{printf $0" ";next;}1'
there will be one more setting. the one that enables the use of custon location. perhaps someone could tell me and i'll flesh this out properly
thanks
Peter Hine Senior Technical Support Engineer (Servers) FCoA ITS peter.hine@familycourt.gov.au
From: Aaron Finney aaron.finney@openx.com To: Observium Network Observation System observium@observium.org Date: 18/11/2015 13:16 Subject: Re: [Observium] Setting Location Sent by: "observium" observium-bounces@observium.org
Neither the webui nor the console menu system is fun for 300+ PDUs. :)
If these were server nodes, I'd just use salt to update the location by cluster. With network devices we can push it using rancid. With the PDUs...we're stuck.
On Tue, Nov 17, 2015 at 4:24 PM, Spencer Ryan sryan@arbor.net wrote: As long as we set "location" properly in the WebUI (or via the config file) on our APC PDUs the locations make it into Observium.
Spencer Ryan | Senior Systems Administrator | sryan@arbor.net Arbor Networks +1.734.794.5033 (d) | +1.734.846.2053 (m) www.arbornetworks.com
On Tue, Nov 17, 2015 at 7:22 PM, Daniel Kasen daniel.kasen@redfin.com wrote: I missed the PDU part, so not sure how your device implements snmp data, but for all are servers we just programatically set this value and it comes through during polling. You could also probably get away with a mysql insert.
Daniel Kasen | REDFIN | Data Center Operations Engineer daniel.kasen@redfin.com | Tel: 206-859-2826 2025 1st Ave, Ste 500 | Seattle, WA 98121
On Tue, Nov 17, 2015 at 4:01 PM, Daniel Kasen daniel.kasen@redfin.com wrote: Yes.
Daniel Kasen | REDFIN | Data Center Operations Engineer daniel.kasen@redfin.com | Tel: 206-859-2826 2025 1st Ave, Ste 500 | Seattle, WA 98121
On Tue, Nov 17, 2015 at 3:38 PM, Aaron Finney aaron.finney@openx.com wrote: Are you talking about adding the location to the snmpd.conf file on the node being polled?
On Tue, Nov 17, 2015 at 3:17 PM, Daniel Kasen < daniel.kasen@redfin.com> wrote: Couldn't you just add the location to the snmpd.conf file? That's what we did and it got parsed into the location field on the next poll.
Daniel Kasen | REDFIN | Data Center Operations Engineer daniel.kasen@redfin.com | Tel: 206-859-2826 2025 1st Ave, Ste 500 | Seattle, WA 98121
On Fri, Nov 13, 2015 at 12:53 PM, Josh Hopper < joshhopper@protectplus.com> wrote: Craaaap. I figured as much.
--
Sincerely,
Joshua Hopper, A+ CE
Sr. Network Administrator
(Embedded image moved to file: pic60263.jpg) http://www.protectplus.com/images/ppluslogo.jpg
420 3rd Ave NW Hickory NC 28601
Office: 828-449-1839x2160 | Cell: 828-855-7565
From: observium [mailto:observium-bounces@observium.org] On Behalf Of Aaron Finney Sent: Friday, November 13, 2015 10:36 AM To: Observium Network Observation System <observium@observium.org > Subject: Re: [Observium] Setting Location
There's no way to do this currently that I'm aware of. We will face the same issue if we deploy Observium in production; hundreds of PDUs that we can't easily update the SNMP location on. So it's either writing an expect script to change the PDUs (probably correct solution), or writing a script on the Observium box to do the necessary mysql adds/updates (more fun solution).
Right now I'm not doing anything about it, it's just another item in the "risks" column. :)
On Tue, Nov 10, 2015 at 8:24 AM, Josh Hopper < joshhopper@protectplus.com> wrote:
Is there a way via command line to set the Location of a device?
For example, in the GUI you click on a given device and hover over the Gear in the far right.
Then click Properties.
Under the Device Settings tab there is a Custom Location.
This is the location I would like to set.
I ran an SNMP Enabler tool and enabled, set and added 100 devices today to Observium.
Rather than set this individually, I was hoping I could do it in bulk via SSH.
--
Sincerely,
Joshua Hopper, A+ CE
Sr. Network Administrator
(Embedded image moved to file: pic31957.jpg) http://www.protectplus.com/images/ppluslogo.jpg
420 3rd Ave NW Hickory NC 28601
Office: 828-449-1839x2160 | Cell: 828-855-7565
_______________________________________________ observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
--
Aaron Finney | Network Engineer
888 East Walnut Street, 2nd Floor | Pasadena, CA 91101
office: +1 (626) 466-1141 x6035
Watch how we make online advertising simple: http://bit.ly/Ent_vid www.openx.com | follow us on: Twitter Facebook LinkedIn
_______________________________________________ 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
--
Aaron Finney | Network Engineer 888 East Walnut Street, 2nd Floor | Pasadena, CA 91101 office: +1 (626) 466-1141 x6035
Watch how we make online advertising simple: http://bit.ly/Ent_vid www.openx.com | follow us on: Twitter Facebook LinkedIn
_______________________________________________ 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
--
Aaron Finney | Network Engineer 888 East Walnut Street, 2nd Floor | Pasadena, CA 91101 office: +1 (626) 466-1141 x6035
Watch how we make online advertising simple: http://bit.ly/Ent_vid www.openx.com | follow us on: Twitter Facebook LinkedIn _______________________________________________ observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
********************************************************************** The information contained in this e-mail (including any attachments) is for the exclusive use of the addressee. If you are not the intended recipient please notify the sender immediately and delete this e-mail. It is noted that legal privilege is not waived because you have read this e-mail. **********************************************************************