Archived community.zenoss.org | full text search
Skip navigation
1 2 Previous Next 81723 Views 16 Replies Latest reply: Sep 11, 2009 8:46 AM by jmp242 RSS
Dieter_be Rank: White Belt 74 posts since
May 27, 2009
Currently Being Moderated

Jul 10, 2009 10:01 AM

WMI vs Snmp for perf monitoring with Zenoss Core

Hi,
I use Zenoss Core 2.4.2 (new install on Debian 5.0)
I need:
1) monitoring and graphing of "the usual stuff" (memory, cpu usage, swap etc)
2) monitoring and graphing processes that match a certain name, on certain devices and alert when their memory consumption goes above a certain treshhold.

I know item 2 may be too specific so I don't have a problem with implementing it myself. But if there are existing things I could use for this, please point me to them happy (I think that this is different from the "process monitoring" feature in zenoss, correct me if I'm wrong)

But for item 1 I have these problems:
1) I would avoid installing 3rd party tools such as "snmp informant" on production boxes. According the official documentation you need this to monitor the things I mentioned. However when I do an snmpwalk on the system I see various MIB's related to memory/cpu/processes so I think it should be possible using the default windows snmp agent, however this does not work out of the box (graphs do not show)
2) WMI seems to be "the way to go" on windows, but the official wmi zenpack is not free, so I cannot use it.
I tried the following zenpacks:
- http://blog.dastru
- http://www.zenoss.com/community/projects/zenpacks/windowswmidevicetemplatep.com/?p=13
But both of these also show no working graphs. (they show empty graphs with RRD errors). I guess this is because they are written for older Zenoss versions.

Thanks for any help.
Dieter
  • jmp242 ZenossMaster 4,060 posts since
    Mar 7, 2007
    Currently Being Moderated
    1. Jul 10, 2009 10:12 AM (in response to Dieter_be)
    WMI vs Snmp for perf monitoring with Zenoss
    I've successfully used the community WMI Zenpack with 2.3.3 anyway, so
    it's generally version required and up...

    You could also try using the PerfMon Zenpack (with proper configuration)
    to read out windows data into zenoss.

    As to your second question, you could probably set a threshold on the
    graphs for the given process in the templates, just like for any
    datasource/template, and alert based on that.
    --
    James Pulver
    Information Technology Area Supervisor
    LEPP Computer Group
    Cornell University



    Dieter_be wrote, On 7/10/2009 10:01 AM:

     

     

    Hi,
    I use Zenoss Core 2.4.2 (new install on Debian 5.0)
    I need:
    1) monitoring and graphing of "the usual stuff" (memory, cpu usage, swap etc)
    2) monitoring and graphing processes that match a certain name, on certain devices and alert when their memory consumption goes above a certain treshhold.

    I know item 2 may be too specific so I don't have a problem with implementing it myself. But if there are existing things I could use for this, please point me to them happy (I think that this is different from the "process monitoring" feature in zenoss, correct me if I'm wrong)

    But for item 1 I have these problems:
    1) I would avoid installing 3rd party tools such as "snmp informant" on production boxes. According the official documentation you need this to monitor the things I mentioned. However when I do an snmpwalk on the system I see various MIB's related to memory/cpu/processes so I think it should be possible using the default windows snmp agent, however this does not work out of the box (graphs do not show)
    2) WMI seems to be "the way to go" on windows, but the official wmi zenpack is not free, so I cannot use it.
    I tried the following zenpacks:
    - http://blog.dastru
    - http://www.zenoss.com/community/projects/zenpacks/windowswmidevicetemplatep.com/?p=13
    But both of these also show no working graphs. (they show empty graphs with RRD errors). I guess this is because they are written for older Zenoss versions.

    Thanks for any help.
    Dieter







    _______________________________________________
    zenoss-windows mailing list
    zenoss-windows@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-windows

    _______________________________________________
    zenoss-windows mailing list
    zenoss-windows@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-windows
  • jmp242 ZenossMaster 4,060 posts since
    Mar 7, 2007
    Currently Being Moderated
    3. Jul 28, 2009 11:54 AM (in response to Dieter_be)
    WMI vs Snmp for perf monitoring with Zenoss
    You could create your own Template I suppose using whatever method you
    like to get the process memory use (Maybe PerfMon?)...
    --
    James Pulver
    Information Technology Area Supervisor
    LEPP Computer Group
    Cornell University



    Dieter_be wrote, On 7/28/2009 11:49 AM:

     

     

    jmp242 wrote:

     

     

    I've successfully used the community WMI Zenpack with 2.3.3 anyway, so
    it's generally version required and up...

    You could also try using the PerfMon Zenpack (with proper configuration)
    to read out windows data into zenoss.

    As to your second question, you could probably set a threshold on the
    graphs for the given process in the templates, just like for any
    datasource/template, and alert based on that.
    --
    James Pulver
    Information Technology Area Supervisor
    LEPP Computer Group
    Cornell University


    Thanks, I got requirement 1 working by using a zenpack I found somewhere on the net. But I'm afraid I didn't explain the 2nd one in enough detail:
    I need to monitor the memory usage of _single_ processes matching a certain name and raise an alert when a threshold is exceeded.
    The built-in zenoss process monitoring feature adds up the usage of all processes matching a certain name, so that's not an option for me.







    _______________________________________________
    zenoss-windows mailing list
    zenoss-windows@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-windows


    _______________________________________________
    zenoss-windows mailing list
    zenoss-windows@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-windows
  • jmp242 ZenossMaster 4,060 posts since
    Mar 7, 2007
    Currently Being Moderated
    5. Aug 5, 2009 12:34 PM (in response to Dieter_be)
    WMI vs Snmp for perf monitoring with Zenoss
    Are rrd files being created in $ZENHOME/perf/device?
    --
    James Pulver
    Information Technology Area Supervisor
    LEPP Computer Group
    Cornell University



    Dieter_be wrote, On 8/5/2009 12:30 PM:

     

     

    jmp242 wrote:

     

     

    You could create your own Template I suppose using whatever method you
    like to get the process memory use (Maybe PerfMon?)...



    Thanks.
    I downloaded the new WMI datasource zenpack (http://www.zenoss.com/community/projects/zenpacks/wmidatasource)
    Then, on the server I created a new performance template.
    The wql for the datasource is:

    Code:

    select PageFileBytes,PoolNonpagedBytes,PoolPagedBytes,PrivateBytes,VirtualBytes,WorkingSet from win32_PerfFormattedData_PerfProc_Process where name LIKE '%indesign%'


    This works fine, it shows the memory metrics for all 3 processes matching the name.

    Then I made datapoints for each field, type GAUGE
    Then I made a graph and added all datapoints to it.
    Now when I go to the 'perf' tab, I see the border which goes around the graph, but no actual graph image. I checked in /usr/local/zenoss/zenoss/log but couldn't really find an error or reason for this.







    _______________________________________________
    zenoss-windows mailing list
    zenoss-windows@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-windows


    _______________________________________________
    zenoss-windows mailing list
    zenoss-windows@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-windows
  • jmp242 ZenossMaster 4,060 posts since
    Mar 7, 2007
    Currently Being Moderated
    7. Aug 6, 2009 9:27 AM (in response to Dieter_be)
    WMI vs Snmp for perf monitoring with Zenoss
    Well, I'd just create multiple Data Sources in the Template, and then
    graph them on the same graph with the set threshold... I think that
    would work.
    --
    James Pulver
    Information Technology Area Supervisor
    LEPP Computer Group
    Cornell University



    Dieter_be wrote, On 8/6/2009 4:22 AM:

     

     

    jmp242 wrote:

     

     

    Are rrd files being created in ZENHOME/perf/device?


    Thanks for helping out James :)
    Turns out I needed to be more patient. After a while it started working.

    But now, here comes the tricky part.
    Remember: my main problem is "alert if the memory usage of any single process matching a string goes above 1GB"
    And I can't really figure out how to do this.
    I thought I could just monitor all processes matching the name but I could not find anything about datasources returning data for multiple entities (
    http://www.zenoss.com/community/docs/zenoss-guide/2.4.0/ch06s02.html ) (eg multiple rows)

    Here is the output of a command execution:


     

     

    Executing command wmic -U '.username '%'*****' //192.168.68.25 --namespace='rootcimv2' "select PageFileBytes,PoolNonpagedBytes,PoolPagedBytes,PrivateBytes,VirtualBytes,WorkingSet from win32_PerfFormattedData_PerfProc_Process where name LIKE '%indesign%'" against QA Indesign server
    CLASS: Win32_PerfFormattedData_PerfProc_Process
    Name|PageFileBytes|PoolNonpagedBytes|PoolPagedBytes|PrivateBytes|VirtualBytes|WorkingSet
    InDesignServer|217841664|39192|372012|217841664|398671872|59248640
    InDesignServer|217841664|39192|372012|217841664|398671872|59432960
    InDesignServer|217841664|39232|380380|217841664|398671872|59146240


    So in this case, there are 3 processes.
    However, the graph only seems to draw each column once. It seems it does this only for the first found process and ignores to the two others.

    Is there a way to have it making datapoints/graphs for each returned line? (and have the same alerting rules for all)







    _______________________________________________
    zenoss-windows mailing list
    zenoss-windows@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-windows


    _______________________________________________
    zenoss-windows mailing list
    zenoss-windows@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-windows
  • jmp242 ZenossMaster 4,060 posts since
    Mar 7, 2007
    Currently Being Moderated
    9. Aug 7, 2009 7:52 AM (in response to Dieter_be)
    WMI vs Snmp for perf monitoring with Zenoss
    Well, I'm afraid you'd be back to command based datasources then, and
    you could use grep etc to parse the output before returning to Zenoss.
    --
    James Pulver
    Information Technology Area Supervisor
    LEPP Computer Group
    Cornell University



    Dieter_be wrote, On 8/7/2009 4:10 AM:

     

     

    jmp242 wrote:

     

     

    Well, I'd just create multiple Data Sources in the Template, and then
    graph them on the same graph with the set threshold... I think that
    would work.



    Well, that sounds simple enough :)
    But I fail at implementing it. WQL doesn't seem to support the 'limit' keyword. I've been googling around and most "solutions" I found on internet work around this by adding more condititions to the where clause, but that's not really an option for me. I need some way to get the first, second, third, fourth,... result from the query so I get the stats for all separate processes separately.







    _______________________________________________
    zenoss-windows mailing list
    zenoss-windows@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-windows


    _______________________________________________
    zenoss-windows mailing list
    zenoss-windows@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-windows
  • nharikrishna Newbie 1 posts since
    Aug 11, 2009
    Currently Being Moderated
    11. Aug 11, 2009 9:57 AM (in response to Dieter_be)
    Re:  WMI vs Snmp for perf monitoring with Ze
    To see the new graphs, try restarting zenoss. I had to do when i added new data points
  • jhelgesen Rank: White Belt 64 posts since
    Dec 10, 2007
    Greetings...

    First of all, congrats on getting this far.

    When I have made some of these custom command datasources for WMIC query outputs, I ended up making the "final" output look as much like a Nagios command output as possible, since Zenoss worked hard at being compatible with that format. "That format", in general, would be
    $results =`\$ZENHOME/bin/wmic -U '@ARGV[1]'%'@ARGV[2]' //@ARGV[0] "SELECT ProcessorQueueLength FROM Win32_PerfFormattedData_PerfOS_System"`;
    
    if ( $results ) {
        @results = split (/\n/,$results);  # split the multi-line output at new lines
        $line = @results;   # $line is the number of lines of output
    
        if ( @results[$line - 2] eq "ProcessorQueueLength" ) {   # The string to match against here is the list of WMI variable names
            @out = split (/\|/,@results[$line - 1]);     # Here we ASSUMING only one line of data to split into an array named "out"
    
            print "OK|ProcessorQueueLength=@out[0] \n";    # And here you make the real output, space delimited, VarName=Value VarName=Value VarName=Value etc etc
            } else {
                    print "Unknown|$results\n";
            }
    } else {
        print "Unknown|No_response\n";
    }
    


    You'll have to bear with me, as I did stuff in Perl, but the basic code to convert from WMI Query output to Nagios output will look something like this:
     Status Message | Name=Value  Name=Value  Name=Value 


    Once the output is set up, you should see the graphs populate with actual numbers.

    I imagine the next step would be to deal with the ProcessID numbers of your process instances, but that's another day's topic.

    Hope this helps...

    --Jay
1 2 Previous Next

More Like This

  • Retrieving data ...