Discussion:
Pinging a parsed device name
joanypony
2012-03-13 23:35:40 UTC
Permalink
joanypony [http://community.zenoss.org/people/joanypony] created the discussion

"Pinging a parsed device name"

To view the discussion, visit: http://community.zenoss.org/message/65173#65173

--------------------------------------------------------------
Hi All,
This is a bit of an odd one. I want to temporarily mangle a device name with python, and then ping it..

*Context:* most of our devices are Dell servers with remote access cards. The remote access cards are given an IP and a hostname.  We monitor the servers and we also monitor the remote access IP to ensure that it's been set up properl and that it's accessible in an emergency.

It would look like this:

*server.joan.com 192.168.1.1*
*server-mgt.joan.com 192.168.2.1*

We always give the remote access card a DNS entry which is the server name appended with "-mgt"

So I created a monitoring template that I would bind to each device. It would then ping the device name appended with "-mgt" to it.

Then I realised that something like:

*"ping {$dev/id}-mgt"*

doesn't work as Zenoss always uses the FQDN, so in reality, you get

*"ping server.joan.com-mgt"*. which is wrong.

I know how to parse the {$dev/id} to get the correct string -

*'-mgt'.join(server.split('.joan.com'))* but this has to be done in a separate python script...

so HOW do I take the device name, pass it to python to edit, then return the correct string to Zenoss to ping?

Sorry. I know it's a fiddly one. I know I could just discover all my remote access cards and ping them the simple way, but this way verifies that no device is missing their remote access...

Thanks!
Joan
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/65173#65173]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
dpetzel
2012-03-14 00:04:25 UTC
Permalink
dpetzel [http://community.zenoss.org/people/dpetzel] created the discussion

"Re: Pinging a parsed device name"

To view the discussion, visit: http://community.zenoss.org/message/65174#65174

--------------------------------------------------------------
Maybe I'm missing something, but why not just add the mgmt-ip as another "device"? You have one device that is a SERVER, and another device that is a DRAC (they just happen to sit in a common enclosure, just like blades sit in a chassis)

You could then have a Device Class /Devices/DRACS (or whatever) and tailor the plugins as needed?
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/65174#65174]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
joanypony
2012-03-14 10:45:51 UTC
Permalink
joanypony [http://community.zenoss.org/people/joanypony] created the discussion

"Re: Pinging a parsed device name"

To view the discussion, visit: http://community.zenoss.org/message/65180#65180

--------------------------------------------------------------
Aha. I figured it out. I just had to put backticks around the parsed name and Zenoss could then use it :)

The reason I didn't want to create a device for each remote access card was to protect against human error.. When we add a new server to our network, one of the tasks is to configure the remote access card. The new device will always get added to Zenoss, but quite often someone forgets the remote access card. If I can make it part of the bound templates for the device, then it's checked automatically.

So now this command:

*/zenoss/scripts/check_ping -H "`python /zenoss/scripts/drac-parse.py ${dev/id}`" -w '250.0,30%' -c '500.0,60%' -p 3*

works and pings the modifed device name.  I'm just using the Nagios ping plugin as I don't need graphs, just availability. I know the builtin Zenoss ping just does availbility but as this entity isn't a standalone device, I can't use it.
Thanks!
Joan
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/65180#65180]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
jmp242
2012-03-14 11:54:36 UTC
Permalink
jmp242 [http://community.zenoss.org/people/jmp242] created the discussion

"Re: Pinging a parsed device name"

To view the discussion, visit: http://community.zenoss.org/message/65160#65160

--------------------------------------------------------------
Hmm, I do what dpetzel suggested. One thing that I think would be more scalable (command datasources are tricky as you scale up) would be to have a cronjob or something that checks via DMD if there's a device, 'mangles' the name, sees if there's a matching IPMI device in your class, and if not, adds one.

--
James Pulver
ZCA Member
LEPP Computer Group
Cornell University
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/65160#65160]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
joanypony
2012-03-14 12:05:50 UTC
Permalink
joanypony [http://community.zenoss.org/people/joanypony] created the discussion

"Re: Pinging a parsed device name"

To view the discussion, visit: http://community.zenoss.org/message/65185#65185

--------------------------------------------------------------
I see what you're saying as regards scale and performance, but for this particular check, we only need to check maybe twice per day, so it's easier to do that, and it forces the user into the correct setup for our environment..

Thanks!
Joan
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/65185#65185]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
jmp242
2012-03-14 12:07:32 UTC
Permalink
jmp242 [http://community.zenoss.org/people/jmp242] created the discussion

"Re: Pinging a parsed device name"

To view the discussion, visit: http://community.zenoss.org/message/65164#65164

--------------------------------------------------------------
So you've set a custom event cycle for the check? Cause the event command default is every 60 seconds I believe.
--
James Pulver
ZCA Member
LEPP Computer Group
Cornell University
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/65164#65164]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
joanypony
2012-03-14 12:13:48 UTC
Permalink
joanypony [http://community.zenoss.org/people/joanypony] created the discussion

"Re: Pinging a parsed device name"

To view the discussion, visit: http://community.zenoss.org/message/65187#65187

--------------------------------------------------------------
Ummm. I'm not entirely sure - in the monitoring template, I set the cycle time to be 21600 = 6 hours. That should do it right?
Regards,
Joan
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/65187#65187]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
jmp242
2012-03-14 12:25:15 UTC
Permalink
jmp242 [http://community.zenoss.org/people/jmp242] created the discussion

"Re: Pinging a parsed device name"

To view the discussion, visit: http://community.zenoss.org/message/65166#65166

--------------------------------------------------------------
Yea, that is what I was talking about - used to be in zproperties for the device, but I see it's in the template also. That should do it then.

--
James Pulver
ZCA Member
LEPP Computer Group
Cornell University
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/65166#65166]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
themactech
2012-03-16 20:53:02 UTC
Permalink
themactech [http://community.zenoss.org/people/themactech] created the discussion

"Re: Pinging a parsed device name"

To view the discussion, visit: http://community.zenoss.org/message/65309#65309

--------------------------------------------------------------
I want to keep track of IPMI response as well, I am working on an IPMI query script now.  I do NOT want to add the IPMI interface as a separate device, since I find that incredibly anti-intuitive.  At all our sites, there is a logic to the IPMI IP address we give (Dell calls it DRAC, Apple calls it LOM but it's all IPMI).  At some site it will be the IP following the server, at other sites it will be the same last IP digits on a different VLAN, etc.  So it can be programatically created in a command script based on the server IP, avoiding 2 devices per server showing up in Zenoss.

If you install ipmitool on your Zenoss machine, you can then have very detailed interaction with you Dell server over IPMI.  You can go beyond pinging and actually test if the DRAC interface is handling requests.  You can even dump data from all sensors to a text file and parse.  This is useful if you are not running windows on the Dells and can't use OpenManage to bridge the IPMI data via SNMP.  Also useful for other brands of server that may use IPMI and don't expose the sensor data any other way.

We use IPMI via terminal frequently to pull a Lazarus on servers here and there.

In my case I will need to dump the SEL sensor data to file and parse it to get power supply, fan, and temperature status.  If I could add Custom Components to my ZenPacks it would like real nice, but alas, have not yet found my holy grail.

Manuel
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/65309#65309]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
joanypony
2012-03-21 11:40:19 UTC
Permalink
joanypony [http://community.zenoss.org/people/joanypony] created the discussion

"Re: Pinging a parsed device name"

To view the discussion, visit: http://community.zenoss.org/message/65358#65358

--------------------------------------------------------------
Hi Manuel,
It's nice to see someone trying to do a similar thing.. It's ok for me as most of our hardware is Dell on Linux, so I can get the majority of my data from a nagios Open Manage check that pulls data by SNMP. This checks fan status, temperature, disk status etc..
Good luck with your SEL sensor data..

Regards,
Joan
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/65358#65358]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Loading...