![](https://secure.gravatar.com/avatar/a5d6cf95d845319b33e8cc33db759d20.jpg?s=120&d=mm&r=g)
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 [cid:image001.jpg@01D11BAA.500B4080] 420 3rd Ave NW Hickory NC 28601 Office: 828-449-1839x2160 | Cell: 828-855-7565
![](https://secure.gravatar.com/avatar/e615dfece074546c2ef176d80890fd77.jpg?s=120&d=mm&r=g)
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*
[image: 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
![](https://secure.gravatar.com/avatar/a5d6cf95d845319b33e8cc33db759d20.jpg?s=120&d=mm&r=g)
Craaaap. I figured as much.
-- Sincerely, Joshua Hopper, A+ CE Sr. Network Administrator [cid:image001.jpg@01D11E2B.60B8DD10] 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.commailto: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 [cid:image001.jpg@01D11E2B.60B8DD10] 420 3rd Ave NW Hickory NC 28601 Office: 828-449-1839x2160tel:828-449-1839x2160 | Cell: 828-855-7565tel:828-855-7565
_______________________________________________ observium mailing list observium@observium.orgmailto:observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
-- [http://i.cdn.openx.com/img/openx_logo.gif] 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.comhttp://www.openx.com/ | follow us on: Twitterhttp://www.twitter.com/ Facebookhttp://www.facebook.com/ LinkedInhttp://www.linkedin.com/
![](https://secure.gravatar.com/avatar/d4ce0d2028dd1d4832d959865499ca9c.jpg?s=120&d=mm&r=g)
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 Engineerdaniel.kasen@redfin.com 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*
[image: 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*
[image: 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 http://www.twitter.com/ Facebook http://www.facebook.com/ LinkedIn http://www.linkedin.com/
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
![](https://secure.gravatar.com/avatar/d4ce0d2028dd1d4832d959865499ca9c.jpg?s=120&d=mm&r=g)
for example I added
"syslocation Seattle, WA"
And it was able to get picked up.
*Daniel Kasen | REDFIN | Data Center Operations Engineerdaniel.kasen@redfin.com daniel.kasen@redfin.com | Tel: 206-859-2826 2025 1st Ave, Ste 500 | Seattle, WA 98121*
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 Engineerdaniel.kasen@redfin.com daniel.kasen@redfin.com | Tel: 206-859-2826 <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*
[image: 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*
[image: 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 http://www.twitter.com/ Facebook http://www.facebook.com/ LinkedIn http://www.linkedin.com/
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
![](https://secure.gravatar.com/avatar/e615dfece074546c2ef176d80890fd77.jpg?s=120&d=mm&r=g)
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 Engineerdaniel.kasen@redfin.com daniel.kasen@redfin.com | Tel: 206-859-2826 <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*
[image: 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*
[image: 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 http://www.twitter.com/ Facebook http://www.facebook.com/ LinkedIn http://www.linkedin.com/
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
![](https://secure.gravatar.com/avatar/d4ce0d2028dd1d4832d959865499ca9c.jpg?s=120&d=mm&r=g)
Yes.
*Daniel Kasen | REDFIN | Data Center Operations Engineerdaniel.kasen@redfin.com 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 Engineerdaniel.kasen@redfin.com daniel.kasen@redfin.com | Tel: 206-859-2826 <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*
[image: 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*
[image: 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 http://www.twitter.com/ Facebook http://www.facebook.com/ LinkedIn http://www.linkedin.com/
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 http://www.twitter.com/ Facebook http://www.facebook.com/ LinkedIn http://www.linkedin.com/
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
![](https://secure.gravatar.com/avatar/d4ce0d2028dd1d4832d959865499ca9c.jpg?s=120&d=mm&r=g)
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 Engineerdaniel.kasen@redfin.com 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 Engineerdaniel.kasen@redfin.com daniel.kasen@redfin.com | Tel: 206-859-2826 <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 Engineerdaniel.kasen@redfin.com daniel.kasen@redfin.com | Tel: 206-859-2826 <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*
[image: 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*
[image: 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 http://www.twitter.com/ Facebook http://www.facebook.com/ LinkedIn http://www.linkedin.com/
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 http://www.twitter.com/ Facebook http://www.facebook.com/ LinkedIn http://www.linkedin.com/
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
![](https://secure.gravatar.com/avatar/eece35488ccb927fb242176d3a8622f0.jpg?s=120&d=mm&r=g)
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 Engineerdaniel.kasen@redfin.com daniel.kasen@redfin.com | Tel: 206-859-2826 <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 Engineerdaniel.kasen@redfin.com daniel.kasen@redfin.com | Tel: 206-859-2826 <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 Engineerdaniel.kasen@redfin.com daniel.kasen@redfin.com | Tel: 206-859-2826 <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*
[image: 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*
[image: 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 http://www.twitter.com/ Facebook http://www.facebook.com/ LinkedIn http://www.linkedin.com/
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 http://www.twitter.com/ Facebook http://www.facebook.com/ LinkedIn http://www.linkedin.com/
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
![](https://secure.gravatar.com/avatar/e615dfece074546c2ef176d80890fd77.jpg?s=120&d=mm&r=g)
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 Engineerdaniel.kasen@redfin.com daniel.kasen@redfin.com | Tel: 206-859-2826 <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 Engineerdaniel.kasen@redfin.com daniel.kasen@redfin.com | Tel: 206-859-2826 <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 Engineerdaniel.kasen@redfin.com daniel.kasen@redfin.com | Tel: 206-859-2826 <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*
[image: 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*
[image: 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 http://www.twitter.com/ Facebook http://www.facebook.com/ LinkedIn http://www.linkedin.com/
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 http://www.twitter.com/ Facebook http://www.facebook.com/ LinkedIn http://www.linkedin.com/
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
![](https://secure.gravatar.com/avatar/06aa7c7b7c1aceeb9f755fe9380d301a.jpg?s=120&d=mm&r=g)
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. **********************************************************************
![](https://secure.gravatar.com/avatar/06aa7c7b7c1aceeb9f755fe9380d301a.jpg?s=120&d=mm&r=g)
alternatively, there is a setlocation php function that can be called .....
thanks
Peter Hine Senior Technical Support Engineer (Servers) FCoA ITS peter.hine@familycourt.gov.au
********************************************************************** 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. **********************************************************************
![](https://secure.gravatar.com/avatar/eece35488ccb927fb242176d3a8622f0.jpg?s=120&d=mm&r=g)
Intern or a Level 1 guy in their spare time. Tell them to get 15 done a day :) Done in a few weeks.
*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 9:15 PM, Aaron Finney aaron.finney@openx.com wrote:
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 Engineerdaniel.kasen@redfin.com daniel.kasen@redfin.com | Tel: 206-859-2826 <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 Engineerdaniel.kasen@redfin.com daniel.kasen@redfin.com | Tel: 206-859-2826 <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 Engineerdaniel.kasen@redfin.com daniel.kasen@redfin.com | Tel: 206-859-2826 <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* > > [image: 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* > > [image: 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 > http://www.twitter.com/ Facebook http://www.facebook.com/ > LinkedIn http://www.linkedin.com/ > > > > _______________________________________________ > 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 http://www.twitter.com/ Facebook http://www.facebook.com/ LinkedIn http://www.linkedin.com/
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 http://www.twitter.com/ Facebook http://www.facebook.com/ LinkedIn http://www.linkedin.com/
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
![](https://secure.gravatar.com/avatar/e99b896dc850fad9bda60656f9786324.jpg?s=120&d=mm&r=g)
On Tue, Nov 17, 2015 at 06:15:47PM -0800, Aaron Finney wrote:
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.
It is possible to push configs to APC PDUs by ftp, and this person has used it with rancid... http://www.gossamer-threads.com/lists/rancid/users/6627 I don't use that with rancid myself, but I have pushed configs to my PDUs with ftp (for syslog). -Nick
![](https://secure.gravatar.com/avatar/06aa7c7b7c1aceeb9f755fe9380d301a.jpg?s=120&d=mm&r=g)
for my part, i have the same problem - as the comms people use their own conventions in sysLocation (if they use it at all). so pushing updates to devices isn't always the answer.
so i don't control the cisco devices. i do the iDRACs, but they don't use sysLocation.
I updated the locations as i slowly added the devices on, to reduce the work load, but i always wanted a script. useful for adding on adding a new physical site.
thanks
Peter Hine Senior Technical Support Engineer (Servers) FCoA ITS peter.hine@familycourt.gov.au
From: Nick Schmalenberger nick@schmalenberger.us To: Observium Network Observation System observium@observium.org Date: 18/11/2015 14:03 Subject: Re: [Observium] Setting Location Sent by: "observium" observium-bounces@observium.org
On Tue, Nov 17, 2015 at 06:15:47PM -0800, Aaron Finney wrote:
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.
It is possible to push configs to APC PDUs by ftp, and this person has used it with rancid... http://www.gossamer-threads.com/lists/rancid/users/6627 I don't use that with rancid myself, but I have pushed configs to my PDUs with ftp (for syslog). -Nick _______________________________________________ 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. **********************************************************************
![](https://secure.gravatar.com/avatar/e99b896dc850fad9bda60656f9786324.jpg?s=120&d=mm&r=g)
On Wed, Nov 18, 2015 at 02:08:04PM +1100, Peter.Hine@familycourt.gov.au wrote:
for my part, i have the same problem - as the comms people use their own conventions in sysLocation (if they use it at all). so pushing updates to devices isn't always the answer.
so i don't control the cisco devices. i do the iDRACs, but they don't use sysLocation.
I updated the locations as i slowly added the devices on, to reduce the work load, but i always wanted a script. useful for adding on adding a new physical site.
thanks
Yeah, I also have alot of inconsistency in the SNMP sysLocation values, so I've found it more convenient to use DNS LOC records instead. If you can use it with a * dns record it would be even more convenient, as right now I have a LOC record for each device, but I have all the hostnames in domains for each phsyical location so it would be nicer to just have one * record for each site domain. Anyway, the LOC records are working well for me :) -Nick
![](https://secure.gravatar.com/avatar/21caf0a08d095be7196a1648d20942be.jpg?s=120&d=mm&r=g)
Peter,
You can also map location A to location B using the config file - if they are not consistent with what you want, but they are consistent in their own way and you can do static mapping you'd be saved I think:
$config['location_map']['Main Datacenter'] = "Big Datacenter, 16 Shrimponthebarbiestreet, Melbourne, Ozzieland";
Tom
On 18/11/2015 04:08, Peter.Hine@familycourt.gov.au wrote:
for my part, i have the same problem - as the comms people use their own conventions in sysLocation (if they use it at all). so pushing updates to devices isn't always the answer.
so i don't control the cisco devices. i do the iDRACs, but they don't use sysLocation.
I updated the locations as i slowly added the devices on, to reduce the work load, but i always wanted a script. useful for adding on adding a new physical site.
thanks
Peter Hine Senior Technical Support Engineer (Servers) FCoA ITS peter.hine@familycourt.gov.au
From: Nick Schmalenberger nick@schmalenberger.us To: Observium Network Observation System observium@observium.org Date: 18/11/2015 14:03 Subject: Re: [Observium] Setting Location Sent by: "observium" observium-bounces@observium.org
On Tue, Nov 17, 2015 at 06:15:47PM -0800, Aaron Finney wrote:
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.
It is possible to push configs to APC PDUs by ftp, and this person has used it with rancid... http://www.gossamer-threads.com/lists/rancid/users/6627 I don't use that with rancid myself, but I have pushed configs to my PDUs with ftp (for syslog). -Nick _______________________________________________ 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.
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
![](https://secure.gravatar.com/avatar/9113800bbd271c46f4585a9549d85c15.jpg?s=120&d=mm&r=g)
this is how we do it, include a separate file in config.php which is a list of all our sitenames(which all our devices use in SNMP sysLocation) and map them to the real adress. works like a charm :)
/Markus
2015-11-18 9:08 GMT+01:00 Tom Laermans tom.laermans@powersource.cx:
Peter,
You can also map location A to location B using the config file - if they are not consistent with what you want, but they are consistent in their own way and you can do static mapping you'd be saved I think:
$config['location_map']['Main Datacenter'] = "Big Datacenter, 16 Shrimponthebarbiestreet, Melbourne, Ozzieland";
Tom
On 18/11/2015 04:08, Peter.Hine@familycourt.gov.au wrote:
for my part, i have the same problem - as the comms people use their own conventions in sysLocation (if they use it at all). so pushing updates to devices isn't always the answer.
so i don't control the cisco devices. i do the iDRACs, but they don't use sysLocation.
I updated the locations as i slowly added the devices on, to reduce the work load, but i always wanted a script. useful for adding on adding a new physical site.
thanks
Peter Hine Senior Technical Support Engineer (Servers) FCoA ITS peter.hine@familycourt.gov.au
From: Nick Schmalenberger nick@schmalenberger.us To: Observium Network Observation System observium@observium.org Date: 18/11/2015 14:03 Subject: Re: [Observium] Setting Location Sent by: "observium" observium-bounces@observium.org
On Tue, Nov 17, 2015 at 06:15:47PM -0800, Aaron Finney wrote:
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.
It is possible to push configs to APC PDUs by ftp, and this
person has used it with rancid... http://www.gossamer-threads.com/lists/rancid/users/6627 I don't use that with rancid myself, but I have pushed configs to my PDUs with ftp (for syslog). -Nick _______________________________________________ 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.
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
![](https://secure.gravatar.com/avatar/7f8ea0ba71ae89ed90a108c357e88bfc.jpg?s=120&d=mm&r=g)
purtoppo nulla.
root@MultiEye:~# snmpwalk -v1 -c public 62.196.83.65 Timeout: No Response from 62.196.83.65
root@MultiEye:~# snmpwalk -v2c -c public 62.196.83.65 Timeout: No Response from 62.196.83.65
Alessandro Arciero Networking & Security Management [Multilink new logo] Multilink Friuli S.r.l. Attività di direzione e coordinamento Serenissima Partecipazioni S.p.A.
Via Marconi 85 | 33010 Tavagnacco (UD), Italy
Tel. +39 0432 498511 | Fax +39 0432 498585 Email alessandro.arciero@multilinkfriuli.netmailto:alessandro.arciero@multilinkfriuli.net | www.multilinkfriuli.net http://www.multilinkfriuli.net/
[image002.png] https://www.linkedin.com/company/multilink-friuli-srl [image003.png] https://twitter.com/MultilinkFriuli [image004.png] https://www.facebook.com/pages/Multilink-Friuli-Srl/200059296701613
Reg. Imprese di UD C.F./P.I. 02271850303 - R.E.A. di UD 248194 | Capitale sociale Euro 50.000,00 i.v.
Le informazioni contenute in questo messaggio di posta elettronica e negli eventuali allegati sono riservate e confidenziali e sono indirizzate esclusivamente al destinatario. Le opinioni ivi eventualmente espresse sono quelle dell'autore: di conseguenza il messaggio non costituisce impegno contrattuale tra Multilink Friuli S.r.l. ed il destinatario, e l'azienda non assume alcuna responsabilità riguardo ai contenuti del testo e dei relativi allegati, ne' per eventuali intercettazioni, modifiche o danneggiamenti. Si prega di non fare copia, inoltrare a terzi o conservare tale messaggio se non si è il legittimo destinatario dello stesso. Qualora questo messaggio sia stato ricevuto per errore, si prega di rinviarlo al mittente e di cancellarlo permanentemente dal proprio computer.
The information contained in this e-mail message and inside the respective attachments are confidential and reserved and are strictly for exclusively use by the intended recipient. The opinions therein and in case expressed, are those of the author: therefore the message doesn’t represent contractual commitment between Multilink Friuli S.r.l. and the recipient, and the company assume no responsibility regard the contents of the text and respective attachments, nor for any interception, changes or damages. Please don’t make copies, forward to thirds or conserve this message if you are not the right recipient. In case you incorrectly received this message, please resend to sender and erase it immediately and permanently from your personal computer.
Prima di stampare, pensa all’ambiente ** Think about the environment before printing.
On 18 November 2015 at 09:17:47, Markus Klock (markus@best-practice.semailto:markus@best-practice.se) wrote:
this is how we do it, include a separate file in config.php which is a list of all our sitenames(which all our devices use in SNMP sysLocation) and map them to the real adress. works like a charm :)
/Markus
2015-11-18 9:08 GMT+01:00 Tom Laermans <tom.laermans@powersource.cxmailto:tom.laermans@powersource.cx>: Peter,
You can also map location A to location B using the config file - if they are not consistent with what you want, but they are consistent in their own way and you can do static mapping you'd be saved I think:
$config['location_map']['Main Datacenter'] = "Big Datacenter, 16 Shrimponthebarbiestreet, Melbourne, Ozzieland";
Tom
On 18/11/2015 04:08, Peter.Hine@familycourt.gov.aumailto:Peter.Hine@familycourt.gov.au wrote:
for my part, i have the same problem - as the comms people use their own conventions in sysLocation (if they use it at all). so pushing updates to devices isn't always the answer.
so i don't control the cisco devices. i do the iDRACs, but they don't use sysLocation.
I updated the locations as i slowly added the devices on, to reduce the work load, but i always wanted a script. useful for adding on adding a new physical site.
thanks
Peter Hine Senior Technical Support Engineer (Servers) FCoA ITS peter.hine@familycourt.gov.aumailto:peter.hine@familycourt.gov.au
From: Nick Schmalenberger <nick@schmalenberger.usmailto:nick@schmalenberger.us> To: Observium Network Observation System <observium@observium.orgmailto:observium@observium.org> Date: 18/11/2015 14:03 Subject: Re: [Observium] Setting Location Sent by: "observium" <observium-bounces@observium.orgmailto:observium-bounces@observium.org>
On Tue, Nov 17, 2015 at 06:15:47PM -0800, Aaron Finney wrote: 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.
It is possible to push configs to APC PDUs by ftp, and this person has used it with rancid... http://www.gossamer-threads.com/lists/rancid/users/6627 I don't use that with rancid myself, but I have pushed configs to my PDUs with ftp (for syslog). -Nick _______________________________________________ observium mailing list observium@observium.orgmailto: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. **********************************************************************
_______________________________________________ observium mailing list observium@observium.orgmailto:observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
_______________________________________________ observium mailing list observium@observium.orgmailto: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
![](https://secure.gravatar.com/avatar/e615dfece074546c2ef176d80890fd77.jpg?s=120&d=mm&r=g)
Let me clarify...with Baytech and Servertech PDUs, we are [maybe] stuck. :D
If we were to decide to put Observium into production, we'd need to find some kind of reasonable solution for this one.
On Tue, Nov 17, 2015 at 7:01 PM, Nick Schmalenberger <nick@schmalenberger.us
wrote:
On Tue, Nov 17, 2015 at 06:15:47PM -0800, Aaron Finney wrote:
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.
It is possible to push configs to APC PDUs by ftp, and this person has used it with rancid... http://www.gossamer-threads.com/lists/rancid/users/6627 I don't use that with rancid myself, but I have pushed configs to my PDUs with ftp (for syslog). -Nick _______________________________________________ observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
![](https://secure.gravatar.com/avatar/d4ce0d2028dd1d4832d959865499ca9c.jpg?s=120&d=mm&r=g)
ugh yea that sounds gross. Can you just update it in the DB, or does that get overwritten by the poller?
*Daniel Kasen | REDFIN | Data Center Operations Engineerdaniel.kasen@redfin.com daniel.kasen@redfin.com | Tel: 206-859-2826 2025 1st Ave, Ste 500 | Seattle, WA 98121*
On Tue, Nov 17, 2015 at 9:12 PM, Aaron Finney aaron.finney@openx.com wrote:
Let me clarify...with Baytech and Servertech PDUs, we are [maybe] stuck. :D
If we were to decide to put Observium into production, we'd need to find some kind of reasonable solution for this one.
On Tue, Nov 17, 2015 at 7:01 PM, Nick Schmalenberger < nick@schmalenberger.us> wrote:
On Tue, Nov 17, 2015 at 06:15:47PM -0800, Aaron Finney wrote:
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.
It is possible to push configs to APC PDUs by ftp, and this person has used it with rancid... http://www.gossamer-threads.com/lists/rancid/users/6627 I don't use that with rancid myself, but I have pushed configs to my PDUs with ftp (for syslog). -Nick _______________________________________________ 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 http://www.twitter.com/ Facebook http://www.facebook.com/ LinkedIn http://www.linkedin.com/
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
![](https://secure.gravatar.com/avatar/21caf0a08d095be7196a1648d20942be.jpg?s=120&d=mm&r=g)
We retrieve current data from the device on every poll, so we will fix the database with reality, so it's not that simple.
You can of course set the right toggle in the DB for the sysLocation override, and then set the overridden location :)
Tom
On 19/11/2015 01:28, Daniel Kasen wrote:
ugh yea that sounds gross. Can you just update it in the DB, or does that get overwritten by the poller?
*Daniel Kasen| REDFIN| Data Center Operations Engineer daniel.kasen@redfin.com mailto:daniel.kasen@redfin.com| Tel: 206-859-2826 2025 1st Ave, Ste 500 | Seattle, WA 98121*
On Tue, Nov 17, 2015 at 9:12 PM, Aaron Finney <aaron.finney@openx.com mailto:aaron.finney@openx.com> wrote:
Let me clarify...with Baytech and Servertech PDUs, we are [maybe] stuck. :D If we were to decide to put Observium into production, we'd need to find some kind of reasonable solution for this one. On Tue, Nov 17, 2015 at 7:01 PM, Nick Schmalenberger <nick@schmalenberger.us <mailto:nick@schmalenberger.us>> wrote: On Tue, Nov 17, 2015 at 06:15:47PM -0800, Aaron Finney wrote: > 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. > > It is possible to push configs to APC PDUs by ftp, and this person has used it with rancid... http://www.gossamer-threads.com/lists/rancid/users/6627 I don't use that with rancid myself, but I have pushed configs to my PDUs with ftp (for syslog). -Nick _______________________________________________ observium mailing list observium@observium.org <mailto: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 <tel:%2B1%20%28626%29%20466-1141%20x6035> Watch how we make online advertising simple:http://bit.ly/Ent_vid www.openx.com <http://www.openx.com/>| follow us on: Twitter <http://www.twitter.com/>Facebook <http://www.facebook.com/>LinkedIn <http://www.linkedin.com/> _______________________________________________ observium mailing list observium@observium.org <mailto: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
![](https://secure.gravatar.com/avatar/e615dfece074546c2ef176d80890fd77.jpg?s=120&d=mm&r=g)
"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)."
Changing each one in the Observium webgui is not an option...
:D
On Wed, Nov 18, 2015 at 4:32 PM, Tom Laermans tom.laermans@powersource.cx wrote:
We retrieve current data from the device on every poll, so we will fix the database with reality, so it's not that simple.
You can of course set the right toggle in the DB for the sysLocation override, and then set the overridden location :)
Tom
On 19/11/2015 01:28, Daniel Kasen wrote:
ugh yea that sounds gross. Can you just update it in the DB, or does that get overwritten by the poller?
*Daniel Kasen | REDFIN | Data Center Operations Engineer daniel.kasen@redfin.com daniel.kasen@redfin.com | Tel: 206-859-2826 <206-859-2826> 2025 1st Ave, Ste 500 | Seattle, WA 98121*
On Tue, Nov 17, 2015 at 9:12 PM, Aaron Finney aaron.finney@openx.com wrote:
Let me clarify...with Baytech and Servertech PDUs, we are [maybe] stuck. :D
If we were to decide to put Observium into production, we'd need to find some kind of reasonable solution for this one.
On Tue, Nov 17, 2015 at 7:01 PM, Nick Schmalenberger < nick@schmalenberger.usnick@schmalenberger.us> wrote:
On Tue, Nov 17, 2015 at 06:15:47PM -0800, Aaron Finney wrote:
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.
It is possible to push configs to APC PDUs by ftp, and this person has used it with rancid... http://www.gossamer-threads.com/lists/rancid/users/6627 I don't use that with rancid myself, but I have pushed configs to my PDUs with ftp (for syslog). -Nick _______________________________________________ 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 <%2B1%20%28626%29%20466-1141%20x6035>
Watch how we make online advertising simple: http://bit.ly/Ent_vid http://bit.ly/Ent_vid www.openx.com | follow us on: Twitter http://www.twitter.com/ Facebook http://www.facebook.com/ LinkedIn http://www.linkedin.com/
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
observium mailing listobservium@observium.orghttp://postman.memetic.org/cgi-bin/mailman/listinfo/observium
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
![](https://secure.gravatar.com/avatar/06aa7c7b7c1aceeb9f755fe9380d301a.jpg?s=120&d=mm&r=g)
Script fo changing location from the command line.
there is way too much output, so just comment out the print statements. but it works using the correct observium php functions (ref: html/pages/device/edit/device.inc.php).
########### example : ./set_custom_location.php my_device_name "oh wow"
output Observium CE 0.15.6.6430 Rename Device
Current Location : fred nerk. Current Override : 1. New Location : oh wow. Now set Location : oh wow. Now set Override : 1.
The entry in the device's logs. Device location changed: 'fred nerk' -> 'oh wow' (by console)
###########
----------------------------------------- #!/usr/bin/env php <?php
/** * Observium * * This file is part of Observium. * * @package observium * @subpackage cli * @author Adam Armstrong adama@memetic.org * @copyright (C) 2006-2015 Adam Armstrong * */
chdir(dirname($argv[0])); $scriptname = basename($argv[0]);
include_once("includes/defaults.inc.php"); include_once("config.php");
$options = getopt("d"); if (isset($options['d'])) { array_shift($argv); } // for compatability
include_once("includes/definitions.inc.php"); include("includes/functions.inc.php");
print_message("%g".OBSERVIUM_PRODUCT." ".OBSERVIUM_VERSION."\n%WRename Device%n\n", 'color'); if (OBS_DEBUG) { print_versions(); }
// Remove a host and all related data from the system
if ($argv[1] && $argv[2]) { $host = strtolower($argv[1]); $id = get_device_id_by_hostname($host); if ($id) { $device = dbFetchRow("SELECT * FROM `devices` WHERE `device_id` = ?", array($id));
//Current settings $currloc = get_dev_attrib($device,'override_sysLocation_string'); $curroverride = get_dev_attrib($device,'override_sysLocation_bool'); print_message("Current Location : $currloc."); print_message("Current Override : $curroverride.");
$newloc = $argv[2]; print_message("New Location : $newloc.");
set_dev_attrib($device, 'override_sysLocation_bool', '1'); set_dev_attrib($device, 'override_sysLocation_string', $newloc);
log_event("Device location changed: '$currloc' -> '$newloc'", $id, 'device', $id, 5);
//Confirm new settings $currloc = get_dev_attrib($device,'override_sysLocation_string'); $curroverride = get_dev_attrib($device,'override_sysLocation_bool'); print_message("Now set Location : $currloc."); print_message("Now set Override : $curroverride.");
} else { print_error("Host $host doesn't exist."); } } else { print_message("%n USAGE: $scriptname hostname <new location>
%rInvalid arguments!%n", 'color', FALSE); }
// EOF -----------------------------------------
thanks
Peter Hine Senior Technical Support Engineer (Servers) FCoA ITS peter.hine@familycourt.gov.au
********************************************************************** 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. **********************************************************************
![](https://secure.gravatar.com/avatar/e615dfece074546c2ef176d80890fd77.jpg?s=120&d=mm&r=g)
Beauty! Cheers!
On Wed, Nov 18, 2015 at 6:43 PM, Peter.Hine@familycourt.gov.au wrote:
Script fo changing location from the command line.
there is way too much output, so just comment out the print statements. but it works using the correct observium php functions (ref: html/pages/device/edit/device.inc.php).
########### example : ./set_custom_location.php my_device_name "oh wow"
output Observium CE 0.15.6.6430 Rename Device
Current Location : fred nerk. Current Override : 1. New Location : oh wow. Now set Location : oh wow. Now set Override : 1.
The entry in the device's logs. Device location changed: 'fred nerk' -> 'oh wow' (by console)
###########
#!/usr/bin/env php <?php
/**
- Observium
- This file is part of Observium.
- @package observium
- @subpackage cli
- @author Adam Armstrong adama@memetic.org
- @copyright (C) 2006-2015 Adam Armstrong
*/
chdir(dirname($argv[0])); $scriptname = basename($argv[0]);
include_once("includes/defaults.inc.php"); include_once("config.php");
$options = getopt("d"); if (isset($options['d'])) { array_shift($argv); } // for compatability
include_once("includes/definitions.inc.php"); include("includes/functions.inc.php");
print_message("%g".OBSERVIUM_PRODUCT." ".OBSERVIUM_VERSION."\n%WRename Device%n\n", 'color'); if (OBS_DEBUG) { print_versions(); }
// Remove a host and all related data from the system
if ($argv[1] && $argv[2]) { $host = strtolower($argv[1]); $id = get_device_id_by_hostname($host); if ($id) { $device = dbFetchRow("SELECT * FROM `devices` WHERE `device_id` = ?", array($id));
//Current settings $currloc = get_dev_attrib($device,'override_sysLocation_string'); $curroverride = get_dev_attrib($device,'override_sysLocation_bool'); print_message("Current Location : $currloc."); print_message("Current Override : $curroverride."); $newloc = $argv[2]; print_message("New Location : $newloc."); set_dev_attrib($device, 'override_sysLocation_bool', '1'); set_dev_attrib($device, 'override_sysLocation_string', $newloc); log_event("Device location changed: '$currloc' -> '$newloc'", $id,
'device', $id, 5);
//Confirm new settings $currloc = get_dev_attrib($device,'override_sysLocation_string'); $curroverride = get_dev_attrib($device,'override_sysLocation_bool'); print_message("Now set Location : $currloc."); print_message("Now set Override : $curroverride.");
} else { print_error("Host $host doesn't exist."); } } else { print_message("%n USAGE: $scriptname hostname <new location>
%rInvalid arguments!%n", 'color', FALSE); }
// EOF
thanks
Peter Hine Senior Technical Support Engineer (Servers) FCoA ITS peter.hine@familycourt.gov.au
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.
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
participants (9)
-
Aaron Finney
-
Alessandro Arciero
-
Daniel Kasen
-
Josh Hopper
-
Markus Klock
-
Nick Schmalenberger
-
Peter.Hine@familycourt.gov.au
-
Spencer Ryan
-
Tom Laermans