joanypony
2012-03-13 23:35:40 UTC
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]
"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]