Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
28,055 additions
and
9,042 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
59 changes: 59 additions & 0 deletions
59
ZenPacks.community.HPMon/ZenPacks/community/HPMon/cpqHeResMem2Module.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
################################################################################ | ||
# | ||
# This program is part of the HPMon Zenpack for Zenoss. | ||
# Copyright (C) 2008, 2009, 2010 Egor Puzanov. | ||
# | ||
# This program can be used under the GNU General Public License version 2 | ||
# You can find full information here: http://www.zenoss.com/oss | ||
# | ||
################################################################################ | ||
|
||
__doc__="""cpqHeResMem2Module | ||
cpqHeResMem2Module is an abstraction of a Memory Module. | ||
$Id: cpqHeResMem2Module.py,v 1.0 2010/11/09 12:52:04 egor Exp $""" | ||
|
||
__version__ = "$Revision: 1.0 $"[11:-2] | ||
|
||
from ZenPacks.community.deviceAdvDetail.MemoryModule import * | ||
from HPComponent import * | ||
|
||
class cpqHeResMem2Module(MemoryModule, HPComponent): | ||
"""MemoryModule object""" | ||
|
||
portal_type = meta_type = 'MemoryModule' | ||
|
||
status = 1 | ||
|
||
# we monitor Memory modules | ||
monitor = True | ||
|
||
statusmap ={1: (DOT_GREY, SEV_WARNING, 'other'), | ||
2: (DOT_GREY, SEV_WARNING, 'Not Present'), | ||
3: (DOT_YELLOW, SEV_WARNING, 'Present'), | ||
4: (DOT_GREEN, SEV_CLEAN, 'Good'), | ||
5: (DOT_YELLOW, SEV_WARNING, 'Add'), | ||
6: (DOT_YELLOW, SEV_WARNING, 'Upgraded'), | ||
7: (DOT_RED, SEV_CRITICAL, 'Missing'), | ||
8: (DOT_RED, SEV_CRITICAL, 'Dos not Match'), | ||
9: (DOT_RED, SEV_CRITICAL, 'Not Supported'), | ||
10:(DOT_RED, SEV_CRITICAL, 'Bad Config'), | ||
11:(DOT_ORANGE, SEV_ERROR, 'Degraded'), | ||
} | ||
|
||
_properties = MemoryModule._properties + ( | ||
{'id':'status', 'type':'int', 'mode':'w'}, | ||
) | ||
|
||
def getRRDTemplates(self): | ||
""" | ||
Return the RRD Templates list | ||
""" | ||
templates = [] | ||
for tname in [self.__class__.__name__]: | ||
templ = self.getRRDTemplateByName(tname) | ||
if templ: templates.append(templ) | ||
return templates | ||
|
||
InitializeClass(cpqHeResMem2Module) |
This file contains 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
34 changes: 34 additions & 0 deletions
34
ZenPacks.community.HPMon/ZenPacks/community/HPMon/migrate/removeIOBytesGraphDef.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
################################################################################ | ||
# | ||
# This program is part of the HPMon Zenpack for Zenoss. | ||
# Copyright (C) 2008, 2009, 2010 Egor Puzanov. | ||
# | ||
# This program can be used under the GNU General Public License version 2 | ||
# You can find full information here: http://www.zenoss.com/oss | ||
# | ||
################################################################################ | ||
|
||
from Products.ZenModel.ZenPack import ZenPackMigration | ||
from Products.ZenModel.migrate.Migrate import Version | ||
|
||
class removeIOBytesGraphDef( ZenPackMigration ): | ||
""" | ||
remove IO Bytes GraphDef from RRDTemplates | ||
""" | ||
version = Version(2, 1) | ||
|
||
def migrate(self, pack): | ||
|
||
hpTemplates = [ 'cpqDaPhyDrv', | ||
'cpqFcaPhyDrv', | ||
'cpqScsiPhyDrv', | ||
] | ||
|
||
for template in pack.dmd.Devices.Server.getAllRRDTemplates(): | ||
if template.id not in hpTemplates: continue | ||
if hasattr(template.graphDefs, 'IO Bytes'): | ||
template.graphDefs._delObject('IO Bytes') | ||
if hasattr(template.graphs, 'IO Bytes'): | ||
template.graphs._delObject('IO Bytes') | ||
|
||
removeIOBytesGraphDef() |
35 changes: 35 additions & 0 deletions
35
ZenPacks.community.HPMon/ZenPacks/community/HPMon/migrate/removeOldHPReports.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
################################################################################ | ||
# | ||
# This program is part of the HPMon Zenpack for Zenoss. | ||
# Copyright (C) 2008, 2009, 2010 Egor Puzanov. | ||
# | ||
# This program can be used under the GNU General Public License version 2 | ||
# You can find full information here: http://www.zenoss.com/oss | ||
# | ||
################################################################################ | ||
|
||
__doc__=''' | ||
Delete the previous HP iLO Boards and HP Storage Controllers reports. | ||
$Id:$ | ||
''' | ||
from Products.ZenModel.ZenPack import ZenPackMigration | ||
from Products.ZenModel.migrate.Migrate import Version | ||
|
||
class removeOldHPReports(ZenPackMigration): | ||
version = Version(2, 1) | ||
|
||
def migrate(self, pack): | ||
if hasattr(pack.dmd.Reports, 'Device Reports'): | ||
devReports = pack.dmd.Reports['Device Reports'] | ||
|
||
if hasattr(devReports, 'HP iLO Boards'): | ||
devReports._delObject('HP iLO Boards') | ||
|
||
if hasattr(devReports, 'HP Storage Controllers'): | ||
devReports._delObject('HP Storage Controllers') | ||
|
||
removeOldHPReports() | ||
|
||
|
This file contains 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
This file contains 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
Oops, something went wrong.