Overview #

This script will scrape eDirectory 8.7.x Imonitor Continuity statistics.

Tool written by John Johnson when we worked together.


Use at your own risk! Standard Disclaimer We are never responsible!

This is OLD code that has not been tested or used in several years.

Typically, you would use the Sadmin user.

This script will scrape eDirectory 8.7.x Imonitor Continuity statistics, such as:

  • Partition Root
  • Errors
  • Last Successful Sync.
  • Maximum Ring Delta
  • Replica's Perishable Data Delta

It will read an input file that specifies the servers and partition roots to collect data from, and print comma-delimited results to standard output.


This script should be portable to any platform that implements Perl 5.x. It has been tested on Windows and Linux. There are several modules that may need to be installed prior to use:

  • Time::Format
  • LWP
  • HTML::TableContentParser

These modules may be installed with PPM (Windows) or CPAN:

perl -MCPAN -e shell


Open a command line in the directory that you placed the attached files.

Usage: getimon.pl [-f inputfile]

If the -f option is not specified, the script will look for a file in the default directory named:


Input file format#

host:domain:iMonitor port:iMonitor user:iMonitor password:T=treename

Output file format#

The field headings are as follows. Comma delimited:
yyyy-mm-dd hh:mm,Partition Root,Partition or Host,Query Status,Errors,Last Successful Sync.,Maximum Ring Delta,Replica's Perishable Data Delta
Tab delimited:
yyyy-mm-dd hh:mm	Partition Root	Partition or Host	Query Status	Errors	Last Successful Sync.	Maximum Ring Delta	Replica's Perishable Data Delta

Example execution#

This example uses an input file in a subdirectory under the ndsuser home directory:
[ndsuser@host] $ $HOME/bin/getimon.pl -f bin/imonLst.txt
2005-09-06 13:20,"T=TREE1",.TREE1.,OK,0,0:00:20,0:00:30,0:00:00
2005-09-06 13:20,"T=TREE2",.TREE2.,OK,0,0:00:51,0:00:41,0:00:41
2005-09-06 13:20,"T=TREE3",.TREE3.,OK,0,0:00:09,0:00:27,0:00:09
2005-09-06 13:20,"T=TREE4",.TREE4.,OK,0,0:54:05,0:00:00,312784:25:57

Scheduling with CRON#

This will run the script to collect data every 5 minutes:
# Gather iMonitor Continuity stats
00,05,10,15,20,25,30,35,40,45,50,55 * * * * $HOME/bin/getimon.pl -f bin/imonLst.txt >> $HOME/imon.log 2>&1

More Information#

There might be more information for this subject on one of the following:

Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
getimon.pl 4.0 kB 1 26-Oct-2012 11:53 jim getimon.pl
« This page (revision-7) was last changed on 25-Jan-2015 11:38 by jim