This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shell -${SHELL} # dash (-) is for login shells | |
shelltitle '' | |
vbell off | |
autodetach on | |
startup_message off | |
defscrollback 8192 | |
hardstatus alwayslastline | |
hardstatus string "%{= ky}%-Lw%{=r}%20>%n %t%{= ky}%+Lw %{= ky}%-=| %{= kW}${USER}@%H " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Products/DataCollector/zenmodeler.py b/Products/DataCollector/zenmodeler.py | |
index 2622fd6..df99e8b 100644 | |
--- a/Products/DataCollector/zenmodeler.py | |
+++ b/Products/DataCollector/zenmodeler.py | |
@@ -644,6 +644,26 @@ class ZenModeler(PBDaemon): | |
try: | |
results = plugin.preprocess(results, self.log) | |
if results: | |
+############################################################################### | |
+ import os |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import logging | |
log = logging.getLogger(__name__) | |
import os | |
import pickle | |
import random | |
import sys | |
import Globals |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: /trunk/core/pynetsnmp/twistedsnmp.py | |
=================================================================== | |
--- /trunk/core/pynetsnmp/twistedsnmp.py (revision 67812) | |
+++ /trunk/core/pynetsnmp/twistedsnmp.py (revision 73453) | |
@@ -228,48 +228,53 @@ | |
log.debug("Received a usmStatsNotInTimeWindows error. Some devices use usmStatsNotInTimeWindows as a normal part of the SNMPv3 handshake.") | |
return | |
default_msg = "packet dropped (OID: {0})".format(usmStatsOidStr) | |
message = USM_STATS_OIDS.get(usmStatsOidStr, default_msg) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
from Products.ZenUtils.Utils import monkeypatch | |
@monkeypatch('Products.ZenModel.DataRoot.DataRoot') | |
def custom_datetime_utcnow(self): | |
''' | |
Return the string version of datetime.utcnow(). | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if 'Value changed from' in evt.summary: | |
new_value = int(float(evt.current)) | |
if evt.eventKey == 'oper_status': | |
if new_value == 1: | |
evt.summary = 'interface operationally up' | |
evt.severity = 0 | |
else: | |
evt.summary = 'interface operationally down' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from Products.DataCollector.plugins.CollectorPlugin import SnmpPlugin | |
from Products.DataCollector.plugins.CollectorPlugin import GetTableMap | |
class MyPlugin(SnmpPlugin): | |
relname = 'myrelation' | |
modname = 'ZenPacks.example.MyStuff' | |
snmpGetTableMaps = ( | |
GetTableMap('sometable', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import Globals | |
from Products.ZenUtils.ZenScriptBase import ZenScriptBase | |
class MyTool(ZenScriptBase): | |
def buildOptions(self): | |
super(MyTool, self).buildOptions() | |
self.parser.add_option( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ZenPacks.community.AIX.AIXBase import AIXBase | |
from ZenPacks.community.zenIbmMQ.MQDevice import MQDevice | |
class AIXAndWebsphereMQDevice(AIXBase, MQDevice): | |
""" | |
Example device subclass. In this case the reason for creating a subclass of | |
device is to add a new type of relation. We want many "ExampleComponent" | |
components to be associated with each of these devices. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
############################################################################## | |
# | |
# Copyright (C) Zenoss, Inc. 2012, all rights reserved. | |
# | |
# This content is made available according to terms specified in | |
# License.zenoss under the directory where your Zenoss product is installed. | |
# | |
############################################################################## |