Discussion:
SNMP Polling on specific time.
spawn!!!
2011-11-24 16:20:53 UTC
Permalink
spawn!!! [http://community.zenoss.org/people/spawn%21%21%21] created the discussion

"SNMP Polling on specific time."

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

--------------------------------------------------------------
Hi All,

I am wondering how to control by time frame of polling the snmp traffic from the devices. I am sure it is possible not sure about the correct way to do it.

I want to poll the snmp data during the specific time and during the rest, there should not be any SNMP activity.

Is there a way to control on device basis too??

Thanks in advance.
--------------------------------------------------------------

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

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
2011-11-29 14:53:19 UTC
Permalink
jmp242 [http://community.zenoss.org/people/jmp242] created the discussion

"Re: SNMP Polling on specific time."

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

--------------------------------------------------------------
You probably will need to be more specific. Zenoss polls via SNMP every 60 seconds. The only time it stops polling a device is when it's marked decomissioned. You could, I suppose, either script going into and out of that state (as without polling you won't get much data to alert on anyway), or you could use command datasources or the like...

--
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/62879#62879]

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]
spawn!!!
2011-11-29 18:23:28 UTC
Permalink
spawn!!! [http://community.zenoss.org/people/spawn%21%21%21] created the discussion

"Re: SNMP Polling on specific time."

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

--------------------------------------------------------------
Hi James,

Thanks for the reply.

Thing is I saw decomissioned option from the forum but was wondering whether any other way to pull it off smoothly and automatedly. I want to shutdown zenoss from polling any snmp data from certain devices during certain hours of the day. Not just stopping zenoss from creating alerts and events. For example from 9am to 5pm I dont want zenoss to poll any snmp data from specific say 10 devices. By 5 pm zenoss should start monitoring and polling snmp info. I am sure some people would be doing this in their setup.

You mentioned about scripting decomission action. Do you have it by any chance? as I am not good with scripting as such.

To add on. Is there a way for zenoss to stop polling snmp from all devices temporarily due to some critical reason or so. I know that I can just go to command prompt and shutdown zenoss. But I was wondering whether I can shutdown polling feature instead of shutting down entire zenoss for temporarily by either shutting down certain deamon or so?

Thanks once again.
Regards.
--------------------------------------------------------------

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

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
2011-11-29 18:31:06 UTC
Permalink
jmp242 [http://community.zenoss.org/people/jmp242] created the discussion

"Re: SNMP Polling on specific time."

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

--------------------------------------------------------------
If you set a device to decomissioned, it's not monitored at all that I'm aware of. I don't have a script to do this however. You can also turn off zenmodeler and zenperfsnmp and any zenpack daemons (if you have them) that use SNMP to disable polling. I expect you may be able to do this with an event command, but I don't know how you'd turn them back on automatically if you're now not polling anything...

Generally, people use templates to set polling options, (i.e. SNMP, WMI, SSH, ping etc) once... I don't actually know people who want Zenoss to regularily stop and then start monitoring specific devices, this is a new request to me...

--
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/62887#62887]

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]
Ryan Matte
2011-11-29 18:44:43 UTC
Permalink
Ryan Matte [http://community.zenoss.org/people/rmatte] created the discussion

"Re: SNMP Polling on specific time."

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

--------------------------------------------------------------
You could write a python script and cron it to move devices in and out of a decomissioned state.  You don't even have to use the decomm state, you can create your own.  In settings you'll see a list of State conversions such as the following:

Production:1000
Pre-Production:500
Test:400
Maintenance:300
Decommissioned:-1
Standby:-2
Spare:-3

In this example list I've added two new states that behave like decommissioned states called Standby and Spare.

We aware that if you only collect data during certain periods then your averages for those devices in any reports will be off, since it will be missing half the data but will average the data out over the whole period.
--------------------------------------------------------------

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

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]
Ryan Matte
2011-11-29 18:52:26 UTC
Permalink
Ryan Matte [http://community.zenoss.org/people/rmatte] created the discussion

"Re: SNMP Polling on specific time."

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

--------------------------------------------------------------
Here's an example of what you would use for a script:

#!/usr/bin/env python
import Globals
from Products.ZenUtils.ZenScriptBase import ZenScriptBase
from transaction import commit

dmd = ZenScriptBase(connect=True, noopts=True).dmd

d = dmd.Devices.findDevice('yourdevice')

for d in dmd.Devices.getSubDevices():
if d.getDeviceName() == "yourdevice" or d.getDeviceName() == "anotherdevice":
  d.setProdState('-2')


Where -2 is the ID of the Production State that you created.
--------------------------------------------------------------

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

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]
spawn!!!
2011-11-29 21:09:11 UTC
Permalink
spawn!!! [http://community.zenoss.org/people/spawn%21%21%21] created the discussion

"Re: SNMP Polling on specific time."

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

--------------------------------------------------------------
Hi James,

Thanks for the information and reply. :)

Hi Ryan,

Thanks for the reply. Nice to see the script... As I am not good with scriptting, Is there any walk through or steps which I can refer to? How to set cron with this script?

How to create state as you mentioned earlier? I see in the script you mentioned that 'yourdevice', how to specify a list of ip addresses or devices? I am sure these questions might be lame for you. :S

Thanks in Advance.
--------------------------------------------------------------

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

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
2011-11-29 21:23:16 UTC
Permalink
jmp242 [http://community.zenoss.org/people/jmp242] created the discussion

"Re: SNMP Polling on specific time."

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

--------------------------------------------------------------
At this point, I have to recommend RTFM(s). It's going to be pretty necessary for you to understand basic Linux things like Cron to get very far with modifying / configuring Zenoss. Some tips about what you should know are in our New Users FAQ:
https://zcaportal.org/wiki/bin/view/ZCA/ZCAFAQ#What_should_I_know_before_using_Zenoss_63 https://zcaportal.org/wiki/bin/view/ZCA/ZCAFAQ#What_should_I_know_before_using_Zenoss_63
--
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/62893#62893]

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]
spawn!!!
2011-12-01 23:48:49 UTC
Permalink
spawn!!! [http://community.zenoss.org/people/spawn%21%21%21] created the discussion

"Re: SNMP Polling on specific time."

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

--------------------------------------------------------------
Hi James and Ryan,

Thanks a lot for the help guys. :)

Regards,
Spawn
--------------------------------------------------------------

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

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]
j053ph4
2011-12-02 14:19:11 UTC
Permalink
j053ph4 [http://community.zenoss.org/people/j053ph4] created the discussion

"Re: SNMP Polling on specific time."

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

--------------------------------------------------------------
Is there a reason that a Maintenance Window wouldn't work for this?

You could create a "Systems" or "Groups" organizer, add the maintenance window to the organizer, and then make the subset of devices a member of that organizer.  This is what I have done for situations like this and it works pretty well.  The "Decommissioned" state is one of the available options.

Hope this helps,

Joseph
--------------------------------------------------------------

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

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]
Ryan Matte
2011-12-02 15:23:25 UTC
Permalink
Ryan Matte [http://community.zenoss.org/people/rmatte] created the discussion

"Re: SNMP Polling on specific time."

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

--------------------------------------------------------------
In my experience the use of maintenance windows is unreliable in terms of returning devices to their previous state once the window ends.  I've had lots of problems with them in the past so I've stopped using them.  Perhaps it's been resolved in more recent versions.
--------------------------------------------------------------

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

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
2011-12-02 15:35:25 UTC
Permalink
jmp242 [http://community.zenoss.org/people/jmp242] created the discussion

"Re: SNMP Polling on specific time."

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

--------------------------------------------------------------
Simple maintenance windows work fine - i.e. you have one computer go into maintenance and then come out. Overlapping ones don't work. It only stores state for one window per device.

--
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/62984#62984]

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]
Ryan Matte
2011-12-02 15:40:31 UTC
Permalink
Ryan Matte [http://community.zenoss.org/people/rmatte] created the discussion

"Re: SNMP Polling on specific time."

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

--------------------------------------------------------------
Yeh, I was having issues with even single maintenance windows in the past.  I guess that was fixed.
--------------------------------------------------------------

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

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]
spawn!!!
2011-12-02 15:49:09 UTC
Permalink
spawn!!! [http://community.zenoss.org/people/spawn%21%21%21] created the discussion

"Re: SNMP Polling on specific time."

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

--------------------------------------------------------------
Exactly. i saw the decomission one in the maintainence window but in the cases like to periodic stop collecting certain number of devices to be stopped and when to set it up on different time schedules for different devices depends on requirement. first it will be hard to create maintainence window manually too... Thts y i was interested in script.

The script ran well and no snmp traffic was seen as soon as the state got changed to decomission. Should test with multiple devices and multiple window scenario
--------------------------------------------------------------

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

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...