Discussion:
TALES Help with remodel
dlitwin
2013-07-01 20:45:59 UTC
Permalink
dlitwin [http://community.zenoss.org/people/dlitwin] created the discussion

"TALES Help with remodel"

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

--------------------------------------------------------------
I've setup an event trigger in Zenoss for a high network interface utilization.

Message Contains *threshold of high utilization exceeded*
*
*
I've setup a notification to remodel the device with that event is generated.

The command I am trying to run is

*zenmodeler run --path=/Devices/Network/Switch/${device/id}*

I want to pass the device name, in this case a switch, to the end of the zenodeler command.

I manually created an event to test and got the following error back:
| Resource: | localhost |
| Component: | zenactiond |
| Event Class: | /App/Failed (http://cabzen.duluth.k12.mn.us:8080/zport/dmd/Events/App/Failed) |
| Status: | New |
| Message: | Traceback (most recent call last): File "/opt/zenoss/Products/ZenModel/actions.py", line 252, in execute self.executeOnTarget(notification, signal, target) File "/opt/zenoss/Products/ZenModel/actions.py", line 499, in executeOnTarget self._execute(notification, signal, environ) File "/opt/zenoss/Products/ZenModel/actions.py", line 535, in _execute raise ActionExecutionException('Unable to perform TALES evaluation on "%s" -- is there an unescaped $?' % command) ActionExecutionException: Unable to perform TALES evaluation on "zenmodeler run --path=/Devices/Network/Switch/${device/id}" -- is there an unescaped $? |



Ultimately what I want to do is create an event trigger so that whenever I get a device in */Devices/Network/Switch or*
*/Devices/Network/Router* which has a high utlization, I want zenoss to remodel that device giving the error.

I must be think and have missed something along the way.  Thanks for any help.

Dannon
--------------------------------------------------------------

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

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Rob Eagle
2013-07-01 20:52:45 UTC
Permalink
Rob Eagle [http://community.zenoss.org/people/reagle] created the discussion

"Re: TALES Help with remodel"

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

--------------------------------------------------------------
Dannon,
The --path switch is to model the entire device class (ie zenmodeler run --path=/Devices/Network/Switch/) .  To model a single device you command should be zenmodeler run -d ${device/id}.
--Rob

--------------------------------------------------------------

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

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
dpetzel
2013-07-01 23:52:00 UTC
Permalink
dpetzel [http://community.zenoss.org/people/dpetzel] created the discussion

"Re: TALES Help with remodel"

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

--------------------------------------------------------------
I'm curious, what is the use case here? Why remodel the whole device because one interface is busy?
--------------------------------------------------------------

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

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
dlitwin
2013-07-02 14:37:13 UTC
Permalink
dlitwin [http://community.zenoss.org/people/dlitwin] created the discussion

"Re: TALES Help with remodel"

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

--------------------------------------------------------------
It's not just one interface.  Zenoss often times will remodel our Cisco switches and detect the wrong interface speed as 10MB when it should be 100MB.  Granted we have 200+ switches, but I get about 4-6 that model wrong every day. It's not consistent which switch models wrong.  It's just annoying to get the errors.  I don't want to drop the error, nor do I want to lock the switch/port to 100MB.

This has been going on since version 3.x of Zenoss.

I've found other people in the forum that have the same issue.

-Dannon
--------------------------------------------------------------

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

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
dpetzel
2013-07-02 15:02:11 UTC
Permalink
dpetzel [http://community.zenoss.org/people/dpetzel] created the discussion

"Re: TALES Help with remodel"

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

--------------------------------------------------------------
Ah interesting. I had seen some stuff about the wrong modeling, but I didnt connect the dots. Thats a pretty creative solution to work around the issue. Thanks for the background info/
--------------------------------------------------------------

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

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Rob Eagle
2013-07-02 19:51:20 UTC
Permalink
Rob Eagle [http://community.zenoss.org/people/reagle] created the discussion

"Re: TALES Help with remodel"

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

--------------------------------------------------------------
We have seen this too (had a ticket open for enterprise with no solution).  For our infrastructure, if the port is down when modeling takes place it is learned as a interface with a configured speed of 10Mbps.  But then when the interface becomes active, speed is negotiated between switch and host - At this point, zenoss does not remodel the interface so utilization is based on the original modeled speed.
--Rob

--------------------------------------------------------------

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

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
digidt
2013-07-11 20:36:11 UTC
Permalink
digidt [http://community.zenoss.org/people/digidt] created the discussion

"Re: TALES Help with remodel"

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

--------------------------------------------------------------
I have information relevant to this post:

For PCs when you shut a computer down or it goes into sleep mode (like you close the lid on a laptop) the NIC is set to 10Mb/s.  I'm not sure if this is the default behavior for Apple computers.  I assume the NIC stays active for the Wake On LAN option and goes to 10Mb for power savings (?). 

Anyways, as soon as you power the computer on it goes back up to whatever the port/switch can handle (Gb or FE). 

I've tested this by viewing the port information on a Cisco switch while a computer was in Windows (1Gb/s) and then closing the lid on the laptop and as soon as it hits sleep mode, the port auto-negotiates to 10Mb.  I tested and observed the same behavior for desktops in both sleep and totally powered off.

By default Zenoss automatically remodels its device inventory every 12 hours so if you brought the Zenoss server online at 2PM it will remodel at 2AM and then again at 2PM every day.  So at 2AM you can assume that a lot of computers are off/asleep and so consequently Zenoss remodels all those ports will remodel at 10Mb.

One possible workaround is to reboot your Zenoss server at 8AM or whenever the workday starts at your company.  From then on the Zenoss server will remodel in the morning after most of the computers are awake/turned on and your Zenoss device inventory will be accurate for the rest of the working day.
--------------------------------------------------------------

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

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
dlitwin
2013-07-12 14:57:40 UTC
Permalink
dlitwin [http://community.zenoss.org/people/dlitwin] created the discussion

"Re: TALES Help with remodel"

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

--------------------------------------------------------------
I did not know this for sure.  Thanks for the clarification.  Makes perfect sense.  Is this the same for other products like Nagios, Solarwinds Orion, etc?
--------------------------------------------------------------

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

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
jmp242
2013-07-12 15:38:24 UTC
Permalink
jmp242 [http://community.zenoss.org/people/jmp242] created the discussion

"Re: TALES Help with remodel"

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

--------------------------------------------------------------
You could look into (I think this is possible) using "Lock" in Zenoss to lock the modelled speeds?

--
James Pulver
ZCA Member
CLASSE 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/73938#73938]

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