Skip navigation
Currently Being Moderated

Zenoss Users Forum FAQ part 2

VERSION 27  Click to view document history
Created on: Feb 17, 2010 2:32 PM by jmp242 - Last Modified:  Jul 11, 2011 3:50 PM by jmp242

Why is there a second page of FAQ?

Simple. The first one is now uneditable with the new forum software. It will just eat later changes. So I've started a "Part 2" for new FAQs. Sadly, I cannot point to this page from the original FAQ, but I can link back from here to that FAQ. Always start with the Original FAQ

.Of course, I also cannot update the original FAQ as things change, so this page will be a sort of Errata... Hopefully I'll either have the time to merge the two here, or eventually be able to edit the original again.

New Users

 

I have a question about Zenoss Enterprise. Where should I ask it?

 

Most forum users use Zenoss Core. The Zenoss forums are support for Zenoss Core. If you've got tips / pointers about Zenoss that are the same in Core as Enterprise, feel free to share in the forums, contribute Zenpacks etc. However, if you want official support for Enterprise, you should contact Zenoss Support rather than the forums. The forum members often will be at best guessing about Enterprise Zenpacks, and you might as well get value from your support contract.

 

Zenoss Configuration

How do I completely disable the Performance Monitoring of Network interfaces?

If you want to save server resources and don't actually care about the network traffic etc from the OOTB perf monitoring, you can simply disable/remove/unbind the ethernetCsmacd template(s). Note that any class that has this removed is going to affect all devices in it.

How do I set up my MySQL database on another server?

 

First, there is official documentation here:

 

However, per this forum thread:

 

there is another step that may be necessary, configuring the triggers etc to work with the zenoss user rather than root.

When you create that DB as root (which we would usually have no other choice to do, right) then it creates the stored

procedure & the trigger as that user. OK, if you allow the mySQL root user (not the OS root user) to connect to that DB

server from the world, maybe that would work, but, if you are sane, and you do not allow root to connect from any where

(ie: in our case, and as ought to be the case) root is only allowed to connect from the localhost, well then, the SP &

Trigger will not be allowed to be called & run. So, they fail, and the zenactions.log shows this failing over & over again

forever. If you painstakingly go back & edit the SP & Trigger to run as the "zenoss" DB user & specifically allow those 2

objects to be run from the host that they are being called from, then they succeed.

 

Thanks to Jason Sjobeck  for this information.

 


How do I make Zenoss stop monitoring a Windows service for all devices that are currently monitoring it?

Thanks to this forum thread:

In a shell on your zenoss server, as user zenoss create a text file called "script" with these contents:

for s in dmd.Services.WinService.serviceclasses():
    if s.id == 'YOUR SERVICE NAME HERE':
        for i in s.instances():
            print i.getDeviceName()
            i.monitor = False  

commit()

Notes:

  • Change "YOUR SERVICE NAME HERE" to whatever service you don't want to monitor anymore
  • Make sure you have a blank line before the "commit()" line like I show

 

Run this script.

In Zenoss 3.x, how do I assign a device to a location?

This is part of the new design, you drag and drop it. However, it's not as obvious as it could be. In MattRKs eloquent words:

 

You actually drag the devices onto the location you want to associate  them with. Also, you can't drag by clicking on the name text. You have  to click in the blank space next to the text to drag the device.

Thanks to this thread.

How to configure LDAP authentication for Zenoss Core 3.0.x

See this thread: http://community.zenoss.org/message/53509#53509

 

Transforms

How do I access count in an event Transform?

 

Here is a cool workaround in a transform though.

Thread: is here

You can easily mod the last few lines to do what you want dependant on the count number.You cannot directly access the count part of an event in an event transform, but you can work around it per Nick Yeats in this thread.

 

 

 

# Create the dedup id; This is what zenoss normally does to the event to ascertain if 
# it is a duplicate (another occurance) of an existing event. We are doing it in this
# transform to be able to reference the count variable, which does not come with an
# incoming event.
dedupfields = [
    evt.device, evt.component, evt.eventClass, evt.eventKey, evt.severity]
if not evt.eventKey:
    dedupfields += [evt.summary]
mydedupid = '|'.join(map(str, dedupfields))


# Get the event details (including count) from the existing event that is in the mysql database
em = dmd.Events.getEventManager()
em.cleanCache()
try:
    ed = em.getEventDetail(dedupid=mydedupid)
    mycount = ed.count
except:
    mycount = 0


# Do what you like with the count;
# In this example we up the severity to CRITICAL if the count is > 3
if mycount > 3:
    evt.severity = 5

 

Modelers

 

How do I create my own custom modeler?

This is not necessarily as difficult as it may seem. Per this thread:

 

You want to make your own custom modeler, thankfully it's not that difficult.  Just go to /usr/local/zenoss/zenoss/Products/DataCollector/plugins/zenoss/snmp and make a copy of DeviceMap.py and rename it to MyDevice.py (or whatever name you want).  Then edit the code, the syntax is fairly simple, your version should look like this:

 



###########################################################################
#
# This program is part of Zenoss Core, an open source monitoring platform.
# Copyright (C) 2007, Zenoss Inc.
#
# This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 as published by # the Free Software Foundation.
#
# For complete information please visit:
http://www.zenoss.com/oss/

# ###########################################################################


__doc__ = """MyDeviceMap


Gather information from My devices.
"""


from Products.DataCollector.plugins.CollectorPlugin import SnmpPlugin, GetMap from Products.DataCollector.plugins.DataMaps import MultiArgs


class MyDeviceMap(SnmpPlugin):
    """Map mib elements from My device
    """

    maptype = "MyDeviceMap"


    snmpGetMap = GetMap({
'.1.3.6.x.x.x.x' : 'setHWTag',
        '.1.3.6.x.x.x.x' : 'setHWProductKey',
        '.1.3.6.x.x.x.x' : 'setHWSerialNumber',          *** this is the one you are looking for ***
        '.1.3.6.x.x.x.x' : 'setOSProductKey',

'.1.3.6.x.x.x.x' : 'snmpContact',
'.1.3.6.x.x.x.x' : 'snmpSysName',
'.1.3.6.x.x.x.x' : 'snmpLocation',
'.1.3.6.x.x.x.x' : 'snmpUpTime',
         })


    def process(self, device, results, log):
        """collect snmp information from this device"""
        log.info('processing %s for device %s', self.name(), device.id)
        getdata, tabledata = results
        om = self.objectMap(getdata)
        return om

 

 

 

 

Now you don't have to populate all the entries there, if all you need is the serial number, just have the line with setHWSerialNumber and remove the others.

 

 

You will then restart zenoss, go to the device class you want these devices in, go to the modeler plugin list for that device class and add "MyDeviceMap" at the BOTTOM of the list.  Your custom modeler will then overwrite anything another modeler might have put in the HWSerialNumber field with the value from the OID you specified.  You can also fill the comments field from the modeler if there is an OID that contains miscellaneous info you find useful for the device, the syntax for that is '1.3.6.x.x.x.x' : 'comments'

 

 

Templates

How do I copy templates in Zenoss 3.0?

Go to Advanced->Monitoring Templates->find the template you want (ie. 'Device') and then find the version of that template you want to copy/override.  Select the template, then go to the gear menu at the bottom left and select "Override Template" and select where you want to copy/override it to.  I'll agree that "Override" is much more confusing than "Copy".

I've created an SNMP datapoint but get OID is bad instead of graphs.

This is often caused because you haven't specificed the exact OID and are testing with snmpwalk. Test with snmpget, and you'll often see that snmpwalk is actually "walking" the tree and adding a .0 or such to the end of the OID you've specified. snmpget shows nothing exists at the specific OID. Zenoss does snmpget for monitoring, so won't "walk" the tree. So make sure to test with snmpget to find the actual OID you want to monitor.

Another method for Per Device Filesystem thresholds (Property driven thresholds):

You could do something called 'Variable Templating' or 'Variable Thresholds'. Basically you set a Custom Property (ussually it begins with a "c", like "cBlockThreshold") on all devices, then reference that Custom Prop in the filesystem threshold formula.To do this, you go to Infrastructure, click on Devices, click on  Details (the little arrow thing next to Infrastructure in the left hand  pane) then select Custom Schema. There you can add a property.

 

Be sure to make the Custom Property first, at /Devices and set it to what you want most servers to abide by (.9?). Then, go into Advanced > Monitoring Templates > FileSystem > Server to set its Max Value to:

> here.getTotalBlocks() * here.cBlockThreshold

Afterward, you can go set that Custom Property to a different number on a per device basis.

 

See tip of the month also - similar instructions: http://community.zenoss.org/blogs/zenossblog/2008/04/23/tip-of-the-month-creating-property-driven-thresholds/

 

How do I autoload a template from a MIB file?

Mr Chippy gives us a great script that Zenoss inc uses for making a template out of a MIB in this thread. Or just download here. Usage instructions from the source code seem to be:

bulkLoadSnmpCounters {/Device/Class,TemplateName} {FileListingOIDs}

Use SSH seems to be broken when I test it.

When you're testing the command of the template in the zenoss web gui, it ignores if you have selected "use ssh". It will run the test on the zenoss server.

 

When the template command runs from zencommand, it connects with SSH to the device before running the command.

 

To test with zencommand, use:

zencommand run -d <HOSTNAME>

This should be run as the zenoss user on the zenoss server.

Technical Troubleshooting

Why doesn't Zenoss see my IP Service (like SMTP)?

Zenoss by default does a SNMP query to enumerate what IP services (open ports) are there to be monitored on the target devices. SNMP isn't always accurate on computers other than Linux, and even on Linux, it sometimes isn't correct with an IPv6 stack running. Fortunately, if the default doesn't work, you have several other options.

 

One is nmap based. You have to symlink nmap into your $ZENHOME/libexec directory:

 

which nmap
/usr/bin/nmap
ln -s /usr/bin/nmap $ZENHOME/libexec/nmap

 

which nmap will tell you where nmap is on your system. Use that in the ln command (replace /usr/bin/nmap with whatever your which nmap gave you)

 

Go into your device or device class. Go to Modeler Plugins. Remove the zenoss.snmp.IpServiceMap - this is the IP service mapper that isn't working. Then click on add fields. Browse down and select zenoss.nmap.IpServiceMap. Drag and drop it over to the Plugins.

 

Now, go to Configuration Properties of the device or device class. Look for zNmapPortscanOptions and enter the command line configuration you want for your nmap models. Note the default settings may fail because of the --open on RHEL5.5 and derivatives - you can just remove it. The default options also only scan up to port 1024, so you may want to just remove that, or edit it. Note again that more ports, the longer it takes to finish, and this can increase load on your monitored server as well as on the Zenoss server.

 

Remember I said there were 2 options? The other is zenoss.portscan.IpServiceMap. You could try that if the nmap one doesn't work for you.

I've changed my graph definition and now get a page load error!

If you use Zenoss 3.0 and change your graph definitions to invalid entries (by mistake or in error), you may get this error when you try and load the page:

The server reported the following error:
ValueError invalid literal for int() with base 10:  ''
The system has encountered an error. Please reload the page.

To fix this problem, try removing the RPN from the graph point in Zope.

 

  1. First, append 'manage' to the end of your URL like this -
  2. Next, in the main window, click rrdTemplates, Device, graphDefs, IO, graphPoints
  3. Choose the graph point you are having the issue with and click the Properties tab in the upper right corner.  Hopefully this shows you the properties page.
  4. Remove your RPN and click 'Save Changes'. 
  5. Remove 'manage' from the URL and see if you can load the device template now.

This is from this thread. Thanks to istoptofly for the information.

Someone gave me a zendmd script - what do I do with it?

The easiest method to use a zendmd scrip from the forums is to copy it exactly into a text file (indents are IMPORTANT) and get it to the zenoss server. You can paste into nano for instance via ssh, or however you get stuff to your zenoss server.

Then, you can tell zendmd to run it via:

zendmd <scriptname

Make sure to do this as the zenoss user.

I have a phantom device, what do I do?

Try running

zenchkrels -r -x1

I'm getting a Network Attribute Error - an object seems stuck. What do I do?

You will need to get to the command line as the zenoss user. Then:

 

First, try dmd.Networks.reIndex(), and dmd.reindex().

Then try ZenCatalog run --createcatalog --forceindex.

If both fail, then there is some hacking needed to fix this. Per this thread http://community.zenoss.org/message/57606#57606

 

1. Shutdown ZenOSS except for zeoctl and zopectl

2. Edit CopySupport.py

vi "/opt/zenoss/lib/python/OFS/CopySupport.py"

 

Modify:

 

def _getOb(self, id, default=_marker):
        try:
            if hasattr(aq_base(self), id):
                return getattr(self, id)
            if default is _marker:
                raise AttributeError, id
            return default
        except Exception:
            pass

3. Restart zeoctl and zopectl to register the change

4. Delete the stuck object via zendmd

dmd.Networks.manage_deleteObjects(['10.19.210.0'])

Replace 10.19.210.0 with your network that you want to delete.

5. Now reverse the changes above to CopySupport.py

6. Again, restart zeoctl and zopectl to register the change.

7. From the CLI reindex the entire system

zencatalog --reindex

This will take a while.

8. Restart ZenOSS.

zenoss restart

The zProperty for Process Monitoring is greyed out?

This is a bug.

zenpatch 25791
Comments (0)