Skip to content

StefCoene/devmon

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UPDATE from Stef Coene
I forked this from https://github.com/bonomani/devmon
He included most of the patches that he found.

I changed this version of devmon and did the following:
- remove all refererences bb/hobbit/BigBrother
- check for the variable XYMSRV so run devmon from tasks.cfg or prepend with xymoncmd
- switch from socket to xymon binary to communicate with the xymon server
- use Getopt::Long for command line parsing
- don't parse hosts.cfg by hand but use xymoncfg command to dump the full hosts.cfg
- use Sys::Hostname to get the hostname

I hope that this will inspire the original author for ideas how devmon can be improved.

2020-08-01
==========
- I merged the upstream changes
- I added a ini style config file for SNMP v3 options: devmonV3.cfg
   - example included with all the allowed options
   - module Config::Tiny is used to parse this config file
      - https://metacpan.org/pod/Config::Tiny
      - apt-get install libconfig-tiny-perl

Stef Coene

=====================================================================
=======
=====================================================================
Devmon VERSION 0.19.06.08, fork at SF version 0.3.1-beta1 r256
======================================================================

SEE END OF FILE for current STATUS and ROADMAP! 
THIS IS NOT AN OFFICIAL VERSION from the original developers:
- Look at SourceForge version for it 
- Previous modifications (2018) of this version were reported to be less
  stable than the SF one, but only template were modify at that time .....
- Use it at your one risk !
- Cisco templates are modifyed to fit my own needs

This devmon version should MORE STABLE AS THE SOURCEFORGE ONE ! 
The most stable is the latest branch version: Now it is 0.19.06.08

Please FORK it if you can, so you/we will be able to add your
contributions / template easily  !!

2019.05 Bruno Manzoni

======================================================================

UPDATE included from Stef Coene                                                                     
                                                                                           
I changed this version of devmon and did the following:                                    
- remove all refererences bb/hobbit/BigBrother                                             
- use Getopt::Long for command line parsing                                                
- use Sys::Hostname to get the hostname                                                    
                                                                                           
======================================================================                                                                                           
======================================================================
                         Original ReadMe
=====================================================================

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.  Please see the file named
  'COPYING' that was included with the distrubition for more details.

 Thanks!
---------------------------------------
  First off, let me thank, in no particular order, the people
  that have helped make Devmon what it is today:

    Henrik Stoerner
    Steve Aiello
    Dan Vande More
    Craig Boyce


 What is Devmon?
---------------------------------------

  Devmon is a Perl script that can monitor a large number of
  remote devices and report problems back to a display server
  running either the BigBrother or Hobbit monitoring software.


 How does Devmon work?
---------------------------------------

  Devmon uses SNMP (Simple Network Management Protocol) to
  obtain the necessary information from remote hosts.  Right
  now, Devmon only supports SNMP versions 1 and 2c (v3 support
  might be added at a later date).

  Devmon determines which hosts to query based on information
  from the display server's hosts.cfg file, which allows you
  to manage all of your monitoring facilities from a single file.

  Devmon can either run in a single-node configuration, a
  single machine does all of the work and reports back to the
  test server (Devmon can even be run ON the test server, for
  small networks), or Devmon can be run in a multi-node cluster.

  A multi-node Devmon installation is considerably more 
  powerful than a single-node one, as it allows you to query
  more hosts on a more timely basis, and it gives you automatic
  load balancing, node failure failover and scalability.  The
  downside, though, is that it is more complicated than a single
  node server, as it requires you to maintain a MySQL server,
  which is what the multi-node cluster uses as a backend for
  data storage.


 What are Devmon's prerequisites?
---------------------------------------

  In order for Devmon to do anything useful, you will need
  a machine capable of running the Perl interpreter, which
  is used to execute the Devmon code.  

  In addition, you will need a machine (either the same machine 
  running Devmon, or a different one) runing either the Hobbit/Xymon 
  or BigBrother monitoring program, which displays the messages
  that Devmon generates.  

  Finally, you will need your to have your Hobbit/Xymon or BigBrother 
  program set up to monitor at least  one host that Devmon has 
  a template for.   Only then will Devmon be able to poll a 
  remote host and display the results.  For more information on 
  Devmon's template system, please consult the TEMPLATES file
  located in the docs directory.
  

 How do I install Devmon?
---------------------------------------

  Detailed instructions are available in the docs/INSTALLATION
  file.  A single-node installation merely requires you to untar
  the Devmon tarball to a suitable location, modify the config
  file appropriately, and start the Devmon daemon.  

  A multi-node installation requires you to do all of the above
  on each node in the cluster, as well as set up a MySQL database
  to facilitate communication between nodes.


 What are Devmon templates?
--------------------------------------

  Devmon can monitor a virtually unlimited number of different 
  device types, by allowing a user to define a template for
  each test to be conducted on a particular device type.
  For instance, a 'cpu' test on a Cisco 2950 switch is its own 
  template, while a 'if_load' test on the same switch is an
  entirely different template.  For more on template creation
  and modification, please see the docs/TEMPLATES file.


 What kind of devices can Devmon monitor?
--------------------------------------

  Basically, any device that supports SNMP v1 or v2c can be
  monitored by Devmon.  Provided that you can determine which
  SNMP OIDs (Object IDentifiers) you want to monitor on that
  device, you can create your own Devmon template (provided
  that a template of the same type doesnt already exist)
  and Devmon will take care of the rest!


 What type of hardware/software does Devmon require?
--------------------------------------

  To date, Devmon has been tested and is known to work
  on Linux and FreeBSD.  Devmon might also run on other
  operating systems with little or no modification, if 
  you succeed at adapting Devmon to a new OS, please drop
  the author a line and let him know of your success.

  As for hardware, the requirements are entirely up
  to how fast you want your collector to be able to run.
  Obviously the machine needs to run an OS that can
  run the Perl binary;  but theoretically you could run
  Devmon on a 386 with 8MB of memory.


$Id: README 190 2011-01-14 13:32:06Z buchanmilne $

===========================================================================================================================================

VERSION 0.3.1b1.256.1

This is a work in progress, changes can occur without notice but is should be the most stable release....

Thanks for all the work done and also all patch/ideas submitted !
Special thanks to W. Nelis and the devmon admins and devs !
Please feel free to fork again and ask for support !

ALL PATCH FROM SOURCEFORGE ARE INTERGRATED IN THIS RELEASE
This fork is an friendly one (Yes, I think it is possible ! ), mainly to push devmon to move again as I think it is great product with
a huge potential. Xymon is also a amazing product ! I used it for years. A cooperation with original devs is desired and asked. To help the 
reinjection of this code or parts of it to the original one, no major  code restructuration was done: you can still easely compare both codes,
but this will limit the possible improvements. I am waiting for your feedback on how to continue. 

FEEDBACK ALWAYS APPRECIATED
 I know we are in a stressing world and sometime when we expressed ourself to improve things, the message is not understood: This is not my case: I will
 always thanks you for your remarks even the message is not clear ! 
 So do not hesitate and use the github ISSUES to communicate even it is not a bug !

REMARK ON THE OID TERM 
As it "key" concept and as it is also extended in some way I created a section in the /devmon/docs/TEMPLATE to explain it more clearly: a must read..

Major improvement
- Improved User-Friendliness
  - Mainly on configuration and template creation
  - Add the 'Blue' color for test that are 'Disabled' and for fun !
  - Error reporting
    - Improved syntax of template error detection
    - Error propagation (see below)
  - Allow white space(s) at the end of a line, but warn
  - and soome bugs that affect friendliness
    - Continuation char on multiline (a feature of 'transform only)
      this allow to have a clean 'transform' 
    - Wrong syntax error line number log reported
    - AUTOMATCH parsing (empty threshold that match any value like
      catching error message)  
  - Multiple tables support in a test with 1 table (anyone) graphed    
    (not only the last one as before)
    - Table sort option:  "TABLE:sort=oid" where the 'oid values' are num (usually int)
      - Display a table based on sorted oid values 
      - Works in conjonction with the 'SORT' transform (see below: 
        new transforms) 
  - Runtime graph for devmon Xymon test 'dm' (thanks to W. Nelis)
    to check the performance through the time

- Presorting algorythm (double sort/topological sort) to have the transforms 
  sorted by dependecies so they can be calculated when they are ready:
  Huge thanks to W. Nelis

- Error propagation feature
  - Errors should have been were already propagated 
    - Sometime the error was lost: Now works with major transform
      (Transforms used in cisco-isr template are tested)
    - Original errors msg and val are propagated in normal mode
    - Original errors val are accumulated and propagate in debug mode

- Multiple error messages and threshold for an oid color
    - We can have now multiple time the same color for an oid in the thresholds file
      with different messages
 
- New transforms:
  WARNING: THE USE OF THIS TRANSFORM BREAKS COMPATIBILTY WITH 
           ORIGINAL CODEi (of course!), SO USE WITH MODERATION !

  - COLTRE     : To collect data when there are "parent" oid values   
  - SORT       : To sort in an increasing order (num or txt, default = txt)
                 oid values. The result (the new oid values) are 
                 int indexes corresponding to the position of the source
                 oid values in the sort.
                 The results are a int between 1 and n 
                 (n is the number of element in the branch oid) 
                 It can be used to 'reindex' an oid if use in conjonction with
                 the CHAIN transform. (similar to the INDEX transform)
  - EVAL       : should be avoided, but it's simply the perl5 eval fct 
                (not used currently in template
  - SET        : See the docs/TEMPLATE for explanation (Thanks to W. Nelis)
  - STATISTIC  : See the docs/TEMPLATE for explanation (Thanks to W. Nelis)

- Transform modifications
  - REGSUB    : Add the capabilities "eg" to the regexp of Regsub 
  - See patch statuts for other modifs (below)

Template Update and Maintained:
- Cisco
  - Cisco r1800, r1900, r2800, r2900, sw2940, sw2950, sw2960, sw3750
    sw3850, sw3650, swIE, rISR, asa
- Wmware
  - esxi6
- Huawei
- For all template:
  - Interfaces graphs are ordered correctly
  - Layer 2 interfaces state can be monitored easily
  - Correct all wrong calculations of traffic
  - Alarming on relative and absolute thresholds for traffic
  - Fan, Power and Module(serial) are monitored
  - Exception file is updated (error propagation feature help a lot in this task) 

             
Major bugs resolved
- Threshold bug (autovivification bug)

Minor bugs resolved
- If a test has multiple table, only last can be graphed
- Ability to graph, even not all values are defined
- Trim files for a better experience
- Do not start more process that devices
- Optimized regexp for speed
- Continuation char working on multi-lines
- Deleted threshold remain undeleted

Version details
0.3.1 Beta r256.1 is the first version with keeping most format from the source in sourceforge to easely reinject this code or part of 
it to the original one
BREAKING CHANGES
 - The result of a division by zero was replaced by 0, but this is not 0. This now replaced by NaN. To remain green you should add 
   to your threshold file the following:
   {oid} : green : NaN :
   or if you like the clear color (like me)
   {oid} : clear : NaN :
   There is a script to modify your template in devmon/extra/add_NaN_thresholds: all template with this version are already updated
   This will also breaks also the BEST transform results as they will be "clear" and not green and they will raise an alamr (Current WIP)
     Thanks to Stef Coene for its feedback
 - Devmon now send runtime data to Xymon to be graphed: look at the quick installation guide in the folder /devmon/extra
0.3.1 Beta r256.2 Major code cleaning (thank to Stef Coene)
0.3.2 Beta r256.3 After code cleaning - Current Master branch

===========================================================================================================================================

PATCH                                                                  Sourceforge Status   this release Status          
38     Template for cisco nexus 3500                                           open            fixed                  07.06.2018 07.06.2018
37     Allow for OIDS with flag in message part of a threshold definition      open            fixed                  01.04.2017 01.04.2017
36     Enhance REGSUB transformation capabilities                              open            fixed(alternate)       01.04.2017 01.04.2017
35     Replacement for function render_msg in module dm_tests.pm               open            wont/partial fix(bugs) 17.03.2017 24.03.2017
34     Replace an OID errors flag by an empty string incase of a green colour  open            fixed                  26.02.2017 04.03.2017
33     Patch for the (T)SWITCH transform to be able to assign empty string     open            fixed                  24.02.2017 24.02.2017
32     Formatting of result of MATH transform                                  open            reported in todo       06.02.2017 06.02.2017
31     Fix typo in function name                                               open            fixed                  16.01.2017 16.01.2017
30     Support for negative numbers in (T)SWITCH                               open            reported in todo       13.01.2015 13.01.2015
29     Document default in SWITCH transform                                    open            fixed                  14.11.2014 14.11.2014
28     Allow function time in a MATH transform                                 open            wont(use eval trans)   22.10.2014 22.10.2014
27     Add TABLE:sort option                                                   open            fixed(alternate)       26.08.2014 26.08.2014
26     Add transform SET                                                       open            fixed(incompleted)     18.08.2014 18.08.2014
25     Fix bug #13                                                             open            fixed(alternate)       25.06.2014 25.06.2014
24     Align columns of a TABLE to the right side                              open            reported in todo       23.10.2013 23.10.2013
23     Consistent notation OIDs                                                open            fixed/alternate)       04.01.2013 04.01.2013
22     Templates for Cisco 7609 and ITP                                        open            fixed                  29.06.2012 29.06.2012
21     Extend capabilites of transform REGSUB                                  open            fixed(alternate)       10.01.2012 10.01.2012
20     Add transform STATISTIC                                                 open            fixed                  06.01.2012 21.12.2012
17     Fix syntax check of the DELTA transform                                 open            fixed(alternate)       02.01.2012 02.01.2012
16     Change output of SPEED transform                                        open            fixed                  02.01.2012 02.01.2012
15     Improve syntax check DELTA transform                                    open            fixed(alternate)       02.01.2012 02.01.2012
14     Layout of devmon statistics in Xymon, test dm                           open            fixed                  02.01.2012 02.01.2012
13     Template for OpenBSD using Net-SNMP                                     open            fixed                  09.08.2011 09.08.2011
12     snmpEngineTime vs sysUpTimeSecs over 497 days                           open            fixed(alternate)       07.03.2011 07.03.2011
11     Brocade SAN switch template                                             open            wont(see sf comment)   07.08.2010 07.08.2010
10     SUBSTR negative                                                         open-remind     wont fix(disp prob)    04.03.2010 22.01.2011
9      New templates for cisco and hp                                          open            fixed(asa+ps) wont:hp  16.11.2009 16.11.2009
2      Cisco Template for Class Based Weighted Fair Qeueing (QoS)              open            fixed                  06.10.2008 06.10.2008
              
FEATURE REQUEST                         
10     New templates for other devices                                         open            wont/part. fixed(1/3)  29.09.2016 29.09.2016
9      Allow for empty repeater-type OIDs                                      open            reported in todo       05.06.2012 05.06.2012
8      exceptions based on other oid values                                    open            reported in todo       19.04.2012 19.04.2012
7      Share templates for similar devices                                     open            reported in todo       22.01.2010 22.01.2010
3      Use OID value in threshold comparison                                   open            reported in todo       31.12.2008 04.04.2011
2      SNMP V3 support                                                         open            reported in todo       17.10.2008 17.10.2008
                         
                         
BUG                         
16     Some interface of cisco Router do not appear                            open            nothing to do          20.09.2015 15.03.2017
15     MATH transform fails if with both repeaters and non-repeaters           open            fixed                  22.10.2014 22.10.2014
14     Cisco-6509 wrong oids for serial                                        open-later      wont(cannot test)      21.12.2011 03.01.2013
13     Thresholds remain undefined                                             open            fixed                  30.08.2011 30.08.2011
12     New templates for Cisco 3750 switch                                     open            fixed(alternate)       01.02.2011 01.02.2011
10     Many templates share "sysdesc" in specs                                 open            wont                   22.01.2010 22.01.2010
9      Template exceptions sorted misleadingly                                 open-remind     reported in todo       31.12.2009 22.01.2011
8      devmon goes purple                                                      open            fixed(alternate)       13.11.2009 13.11.2009
6      cisco-2811 has wrong ifName oids                                        open-later      fixed                  19.02.2009 05.02.2010
5      Wrong threshold calculation for Cisco templates                         open            fixed                  03.02.2009 03.02.2009

===========================================================================================================================================
                         
TODO                         
Priority 1: Sourceforge open and bugs
       Memory leaks
         On linux 
         On BSD (major)
         One was in xymon-rrd, but should be fixed now? (version?) 
       Support for negative numbers in (T)SWITCH: Parse mathematical expression simply....: Need more work
       Format display (SUBSTR negative, Align columns of a TABLE to the right side,  Formatting of result of MATH transform): Problems Alignement and Padding
       Exceptions based on other oid values: now only PriOi: make it work for alternate oid
       Template exceptions sorted misleadingly: need documentation clarification
       Use OID value in threshold comparison: Nice to have (workaround is to do that is transform)
       Share templates for similar devices: Lot of work!!!

Priority 2: Fix current changes        
       Fix Huawei template: Power, Temperature                    
       Document Transform Coltre, Sort, Eval                    

Priority 3: Other
       Warn if autovivification (creates the hash if it do not exists, but it should not) and check if it does already make problem 
       Make Table compatible with LEAF 
       SNMPv3: After trinig to use the work from StefCoene, it seem more complicated that what I tought...       
       

FEATURE REQUEST

       Better discovery (SF bug 10)
       Multiple graph in a test
       Add better timer calculation (HiRes)

HELP NEEDED
      
       Template not listed above cannot be test: please help to updated: take a look at template liste above that are maintained! 
       Template exceptions sorted misleadingly: need documentation clarification: I dont used it: I need concrate case!)

Date 17.05.2019

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Perl 96.2%
  • Shell 2.5%
  • C 1.3%