Xymon Mailing List Archive search

Migrate hobbit data

18 messages in this thread

list James Roberts · Tue, 5 Aug 2008 12:00:14 +0100 ·
I am planning to move my hobbit server install to a new server...

If it possible to migrate all the data from the old install to the new
one?


James Roberts
IT Consultant - IT Services
Hampshire County Council
Room XXX,Elizabeth II Court, The Castle,
Winchester, Hants SO23 8US
Internal HPSN: (200) 5037
Tel: +XX (X)XXXX XXXXXX
Fax: +XX (X)XXXX XXXXXX
user-d7df29bbad83@xymon.invalid
Web: WWW.Hants.Gov.UK
list T.J. Yang · Tue, 5 Aug 2008 06:15:09 -0500 ·
Migrate hobbit dataa very good entry for FAQ or HOWTO if it is not already in hobbitmon wiki site.
http://en.wikibooks.org/wiki/System_Monitoring_with_Hobbit/Other_Docs 

tj
quoted from James Roberts


From: Roberts, James Sent: Tuesday, August 05, 2008 6:00 AM
To: user-ae9b8668bcde@xymon.invalid Subject: [hobbit] Migrate hobbit data


I am planning to move my hobbit server install to a new server. 
If it possible to migrate all the data from the old install to the new one? 


James Roberts IT Consultant - IT Services Hampshire County Council Room XXX,Elizabeth II Court, The Castle, Winchester, Hants SO23 8US Internal HPSN: (200) 5037 Tel: +XX (X)XXXX XXXXXX Fax: +XX (X)XXXX XXXXXX user-d7df29bbad83@xymon.invalid Web: WWW.Hants.Gov.UK
list Vernon Everett · Tue, 5 Aug 2008 20:36:17 +0800 ·
Yes, but with a caveat.
If you change architecture, your rrd files might not survive.
If you go like for like e.g. x86 to x86, you should be fine.
However, you will have problems if you migrate from X86 to Sparc, or
vice-versa.
There is a workaround, but I would rather have my head set on fire, and
put out with a sledghammer.
 If you are going to the same OS, and the same hardware, then it's full
steam ahead, and f*** the icebergs.
Make sure your new server has all the prerequisites for Hobbit
installed.
Install Hobbit. Check it starts, then shut it down.
Now simply shut down the old Hobbit installation, copy the data and
config files, and start up the new one.
 Your data will include ~/server/etc
And /wherever/you/put/hobbit/data
Don't forget any custom scripts in ~server/ext
 Make sure the clients are pointing to the new server.
The easiest way is to change the IP address of the new server to look
like the old.
Failing that, change DNS or host lookup to point ot the new server.
 You should then be back in business.
   

From: T.J. Yang [mailto:user-8e841282cda5@xymon.invalid] Sent: Tuesday, 5 August 2008 7:15 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] Migrate hobbit data


a very good entry for FAQ or HOWTO if it is not already in hobbitmon
quoted from T.J. Yang
wiki site.
http://en.wikibooks.org/wiki/System_Monitoring_with_Hobbit/Other_Docs   tj

From: Roberts, James <mailto:user-d7df29bbad83@xymon.invalid>  Sent: Tuesday, August 05, 2008 6:00 AM
To: user-ae9b8668bcde@xymon.invalid Subject: [hobbit] Migrate hobbit data


I am planning to move my hobbit server install to a new server... 
If it possible to migrate all the data from the old install to the new
one? 


James Roberts IT Consultant - IT Services Hampshire County Council Room XXX,Elizabeth II Court, The Castle, Winchester, Hants SO23 8US Internal HPSN: (200) 5037 Tel: +XX (X)XXXX XXXXXX Fax: +XX (X)XXXX XXXXXX user-d7df29bbad83@xymon.invalid Web: WWW.Hants.Gov.UK <file://WWW.Hants.Gov.UK>  

NOTICE: This email and any attachments are confidential. They may contain legally privileged information or copyright material. You must not read, copy, use or disclose them without authorisation. If you are not an intended recipient, please contact us at once by return email and then delete both messages and all attachments.
list James Roberts · Tue, 5 Aug 2008 13:54:27 +0100 ·
ok sledgehammer at the ready....what's the work around?
quoted from Vernon Everett
 

From: Everett, Vernon [mailto:user-9da1a1882f49@xymon.invalid] Sent: 05 August 2008 13:36
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Migrate hobbit data


Yes, but with a caveat.
If you change architecture, your rrd files might not survive.
If you go like for like e.g. x86 to x86, you should be fine.
However, you will have problems if you migrate from X86 to Sparc, or
vice-versa.
There is a workaround, but I would rather have my head set on fire, and
put out with a sledghammer.
 If you are going to the same OS, and the same hardware, then it's full
steam ahead, and f*** the icebergs.
Make sure your new server has all the prerequisites for Hobbit
installed.
Install Hobbit. Check it starts, then shut it down.
Now simply shut down the old Hobbit installation, copy the data and
config files, and start up the new one.
 Your data will include ~/server/etc
And /wherever/you/put/hobbit/data
Don't forget any custom scripts in ~server/ext
 Make sure the clients are pointing to the new server.
The easiest way is to change the IP address of the new server to look
like the old.
Failing that, change DNS or host lookup to point ot the new server.
 You should then be back in business.
   

From: T.J. Yang [mailto:user-8e841282cda5@xymon.invalid] Sent: Tuesday, 5 August 2008 7:15 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] Migrate hobbit data


a very good entry for FAQ or HOWTO if it is not already in hobbitmon
wiki site.
http://en.wikibooks.org/wiki/System_Monitoring_with_Hobbit/Other_Docs   tj

From: Roberts, James <mailto:user-d7df29bbad83@xymon.invalid>  Sent: Tuesday, August 05, 2008 6:00 AM
To: user-ae9b8668bcde@xymon.invalid Subject: [hobbit] Migrate hobbit data


I am planning to move my hobbit server install to a new server... 
If it possible to migrate all the data from the old install to the new
one? 


James Roberts IT Consultant - IT Services Hampshire County Council Room XXX,Elizabeth II Court, The Castle, Winchester, Hants SO23 8US Internal HPSN: (200) 5037 Tel: +XX (X)XXXX XXXXXX Fax: +XX (X)XXXX XXXXXX user-d7df29bbad83@xymon.invalid Web: WWW.Hants.Gov.UK <file://WWW.Hants.Gov.UK>  
NOTICE: This email and any attachments are confidential. They may contain legally privileged information or copyright material. You must not read, copy, use or disclose them without authorisation. If you are not an intended recipient, please contact us at once by return email and then delete both messages and all attachments.
list Dan McDonald · Tue, 5 Aug 2008 08:07:42 -0500 ·
On Tue, 2008-08-05 at 13:54 +0100, Roberts, James wrote:
ok sledgehammer at the ready....what's the work around?
 
You have to export every rrd file as xml, and then re-import them on the
new platform.  The base commands are rrdtool xport and rrdtool restore.
Getting the options correct is non-trivial.  
-- 
Daniel J McDonald, CCIE #2495, CISSP #78281, CNX
Austin Energy
http://www.austinenergy.com
list Vernon Everett · Tue, 5 Aug 2008 21:08:56 +0800 ·
You are a glutton for punishment, aren't you?
 You have to use rrdtool and export the data from every .rrd file into an
XML file.
Then copy the XML dumps over to the new server, and import them back
into .rrd files of the same name.
 The issue has to do with Solaris/Sparc being big-endian and Linux/Intel
is little-endian, and how the data is stored on different architecture.
Read more here http://en.wikipedia.org/wiki/Big-endian (If I try and
explain, I will probably stuff it up. It's late here)
 You can read more about the migration here.
http://osdir.com/ml/network.smokeping.user/2003-06/msg00019.html
You can script it to make it easier, but your migration will take a LOT
longer.
 Cheers
     V
quoted from James Roberts


From: Roberts, James [mailto:user-d7df29bbad83@xymon.invalid] Sent: Tuesday, 5 August 2008 8:54 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Migrate hobbit data


ok sledgehammer at the ready....what's the work around?
 

From: Everett, Vernon [mailto:user-9da1a1882f49@xymon.invalid] Sent: 05 August 2008 13:36
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Migrate hobbit data


Yes, but with a caveat.
If you change architecture, your rrd files might not survive.
If you go like for like e.g. x86 to x86, you should be fine.
However, you will have problems if you migrate from X86 to Sparc, or
vice-versa.
There is a workaround, but I would rather have my head set on fire, and
put out with a sledghammer.
 If you are going to the same OS, and the same hardware, then it's full
steam ahead, and f*** the icebergs.
Make sure your new server has all the prerequisites for Hobbit
installed.
Install Hobbit. Check it starts, then shut it down.
Now simply shut down the old Hobbit installation, copy the data and
config files, and start up the new one.
 Your data will include ~/server/etc
And /wherever/you/put/hobbit/data
Don't forget any custom scripts in ~server/ext
 Make sure the clients are pointing to the new server.
The easiest way is to change the IP address of the new server to look
like the old.
Failing that, change DNS or host lookup to point ot the new server.
 You should then be back in business.
   

From: T.J. Yang [mailto:user-8e841282cda5@xymon.invalid] Sent: Tuesday, 5 August 2008 7:15 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] Migrate hobbit data


a very good entry for FAQ or HOWTO if it is not already in hobbitmon
wiki site.
http://en.wikibooks.org/wiki/System_Monitoring_with_Hobbit/Other_Docs   tj

From: Roberts, James <mailto:user-d7df29bbad83@xymon.invalid>  Sent: Tuesday, August 05, 2008 6:00 AM
To: user-ae9b8668bcde@xymon.invalid Subject: [hobbit] Migrate hobbit data


I am planning to move my hobbit server install to a new server... 
If it possible to migrate all the data from the old install to the new
one? 


James Roberts IT Consultant - IT Services Hampshire County Council Room XXX,Elizabeth II Court, The Castle, Winchester, Hants SO23 8US Internal HPSN: (200) 5037 Tel: +XX (X)XXXX XXXXXX Fax: +XX (X)XXXX XXXXXX user-d7df29bbad83@xymon.invalid Web: WWW.Hants.Gov.UK <file://WWW.Hants.Gov.UK>  
NOTICE: This email and any attachments are confidential. They may contain legally privileged information or copyright material. You must not read, copy, use or disclose them without authorisation. If you are not an intended recipient, please contact us at once by return email and then delete both messages and all attachments.

NOTICE: This email and any attachments are confidential. They may contain legally privileged information or copyright material. You must not read, copy, use or disclose them without authorisation. If you are not an intended recipient, please contact us at once by return email and then delete both messages and all attachments.
list Josh Luthman · Tue, 5 Aug 2008 10:10:27 -0400 ·
Good luck and may the force be with you.

Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX

Those who don't understand UNIX are condemned to reinvent it, poorly.
--- Henry Spencer


On Tue, Aug 5, 2008 at 9:07 AM, McDonald, Dan <user-290ce4e24e19@xymon.invalid
quoted from Dan McDonald
wrote:
On Tue, 2008-08-05 at 13:54 +0100, Roberts, James wrote:
ok sledgehammer at the ready....what's the work around?

You have to export every rrd file as xml, and then re-import them on the
new platform.  The base commands are rrdtool xport and rrdtool restore.
Getting the options correct is non-trivial.
--
Daniel J McDonald, CCIE #2495, CISSP #78281, CNX
Austin Energy
http://www.austinenergy.com

list Martin Flemming · Tue, 5 Aug 2008 18:42:07 +0200 (CEST) ·
Maybe this thread helps ...

http://www.hswn.dk/hobbiton/2007/01/msg00346.html

cheers,
 	martin
quoted from Vernon Everett

On Tue, 5 Aug 2008, Everett, Vernon wrote:
You are a glutton for punishment, aren't you?

You have to use rrdtool and export the data from every .rrd file into an
XML file.
Then copy the XML dumps over to the new server, and import them back
into .rrd files of the same name.

The issue has to do with Solaris/Sparc being big-endian and Linux/Intel
is little-endian, and how the data is stored on different architecture.
Read more here http://en.wikipedia.org/wiki/Big-endian (If I try and
explain, I will probably stuff it up. It's late here)

You can read more about the migration here.
http://osdir.com/ml/network.smokeping.user/2003-06/msg00019.html
You can script it to make it easier, but your migration will take a LOT
longer.

Cheers
    V


From: Roberts, James [mailto:user-d7df29bbad83@xymon.invalid]
Sent: Tuesday, 5 August 2008 8:54 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Migrate hobbit data


ok sledgehammer at the ready....what's the work around?


From: Everett, Vernon [mailto:user-9da1a1882f49@xymon.invalid]
Sent: 05 August 2008 13:36
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Migrate hobbit data


Yes, but with a caveat.
If you change architecture, your rrd files might not survive.
If you go like for like e.g. x86 to x86, you should be fine.
However, you will have problems if you migrate from X86 to Sparc, or
vice-versa.
There is a workaround, but I would rather have my head set on fire, and
put out with a sledghammer.

If you are going to the same OS, and the same hardware, then it's full
steam ahead, and f*** the icebergs.
Make sure your new server has all the prerequisites for Hobbit
installed.
Install Hobbit. Check it starts, then shut it down.
Now simply shut down the old Hobbit installation, copy the data and
config files, and start up the new one.

Your data will include ~/server/etc
And /wherever/you/put/hobbit/data
Don't forget any custom scripts in ~server/ext

Make sure the clients are pointing to the new server.
The easiest way is to change the IP address of the new server to look
like the old.
Failing that, change DNS or host lookup to point ot the new server.

You should then be back in business.


From: T.J. Yang [mailto:user-8e841282cda5@xymon.invalid]
Sent: Tuesday, 5 August 2008 7:15 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] Migrate hobbit data


a very good entry for FAQ or HOWTO if it is not already in hobbitmon
wiki site.
http://en.wikibooks.org/wiki/System_Monitoring_with_Hobbit/Other_Docs


tj

From: Roberts, James <mailto:user-d7df29bbad83@xymon.invalid>
Sent: Tuesday, August 05, 2008 6:00 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] Migrate hobbit data


I am planning to move my hobbit server install to a new server...

If it possible to migrate all the data from the old install to the new
one?


James Roberts
IT Consultant - IT Services
Hampshire County Council
Room XXX,Elizabeth II Court, The Castle,
Winchester, Hants SO23 8US
Internal HPSN: (200) 5037
Tel: +XX (X)XXXX XXXXXX
Fax: +XX (X)XXXX XXXXXX
user-d7df29bbad83@xymon.invalid
Web: WWW.Hants.Gov.UK <file://WWW.Hants.Gov.UK>

NOTICE: This email and any attachments are confidential.
They may contain legally privileged information or
copyright material. You must not read, copy, use or
disclose them without authorisation. If you are not an
intended recipient, please contact us at once by return
email and then delete both messages and all attachments.

NOTICE: This email and any attachments are confidential.
They may contain legally privileged information or
copyright material. You must not read, copy, use or
disclose them without authorisation. If you are not an
intended recipient, please contact us at once by return
email and then delete both messages and all attachments.
list Tom Kauffman · Tue, 5 Aug 2008 17:22:20 -0400 ·
For each rrd data file - rrdutile dump <filename> >unloaded filename; then move the ascii xml file you just created to the new platform and run rrdutil restore - see the rrd manpages for the proper syntax. And it's not that hard to script the whole process.

Tom Kauffman
quoted from Martin Flemming

From: Roberts, James [mailto:user-d7df29bbad83@xymon.invalid]
Sent: Tuesday, August 05, 2008 8:54 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Migrate hobbit data

ok sledgehammer at the ready....what's the work around?


From: Everett, Vernon [mailto:user-9da1a1882f49@xymon.invalid]
Sent: 05 August 2008 13:36
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Migrate hobbit data
Yes, but with a caveat.
If you change architecture, your rrd files might not survive.
If you go like for like e.g. x86 to x86, you should be fine.
However, you will have problems if you migrate from X86 to Sparc, or vice-versa.
There is a workaround, but I would rather have my head set on fire, and put out with a sledghammer.

If you are going to the same OS, and the same hardware, then it's full steam ahead, and f*** the icebergs.
Make sure your new server has all the prerequisites for Hobbit installed.
Install Hobbit. Check it starts, then shut it down.
Now simply shut down the old Hobbit installation, copy the data and config files, and start up the new one.

Your data will include ~/server/etc
And /wherever/you/put/hobbit/data
Don't forget any custom scripts in ~server/ext

Make sure the clients are pointing to the new server.
The easiest way is to change the IP address of the new server to look like the old.
Failing that, change DNS or host lookup to point ot the new server.

You should then be back in business.


From: T.J. Yang [mailto:user-8e841282cda5@xymon.invalid]
Sent: Tuesday, 5 August 2008 7:15 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] Migrate hobbit data
a very good entry for FAQ or HOWTO if it is not already in hobbitmon wiki site.
http://en.wikibooks.org/wiki/System_Monitoring_with_Hobbit/Other_Docs


tj

From: Roberts, James<mailto:user-d7df29bbad83@xymon.invalid>
Sent: Tuesday, August 05, 2008 6:00 AM
To: user-ae9b8668bcde@xymon.invalid<mailto:user-ae9b8668bcde@xymon.invalid>
Subject: [hobbit] Migrate hobbit data


I am planning to move my hobbit server install to a new server...

If it possible to migrate all the data from the old install to the new one?


James Roberts
IT Consultant - IT Services
Hampshire County Council
Room XXX,Elizabeth II Court, The Castle,
Winchester, Hants SO23 8US
Internal HPSN: (200) 5037
Tel: +XX (X)XXXX XXXXXX
Fax: +XX (X)XXXX XXXXXX
user-d7df29bbad83@xymon.invalid

Web: WWW.Hants.Gov.UK<file:///\\WWW.Hants.Gov.UK>
quoted from Martin Flemming

NOTICE: This email and any attachments are confidential.

They may contain legally privileged information or

copyright material. You must not read, copy, use or

disclose them without authorisation. If you are not an

intended recipient, please contact us at once by return

email and then delete both messages and all attachments.

CONFIDENTIALITY NOTICE:  This email and any attachments are for the 
exclusive and confidential use of the intended recipient.  If you are not
the intended recipient, please do not read, distribute or take action in 
reliance upon this message. If you have received this in error, please 
notify us immediately by return email and promptly delete this message 
and its attachments from your computer system. We do not waive  
attorney-client or work product privilege by the transmission of this
message.
list Tom Kauffman · Tue, 5 Aug 2008 17:23:57 -0400 ·
Trust me; you also run into this problem moving from X86 Linux to X86_64 Linux.

Tom
quoted from Tom Kauffman

From: Everett, Vernon [mailto:user-9da1a1882f49@xymon.invalid]
Sent: Tuesday, August 05, 2008 9:09 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Migrate hobbit data

You are a glutton for punishment, aren't you?

You have to use rrdtool and export the data from every .rrd file into an XML file.
Then copy the XML dumps over to the new server, and import them back into .rrd files of the same name.

The issue has to do with Solaris/Sparc being big-endian and Linux/Intel is little-endian, and how the data is stored on different architecture.
Read more here http://en.wikipedia.org/wiki/Big-endian (If I try and explain, I will probably stuff it up. It's late here)

You can read more about the migration here.
http://osdir.com/ml/network.smokeping.user/2003-06/msg00019.html
You can script it to make it easier, but your migration will take a LOT longer.

Cheers
     V


From: Roberts, James [mailto:user-d7df29bbad83@xymon.invalid]
Sent: Tuesday, 5 August 2008 8:54 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Migrate hobbit data
ok sledgehammer at the ready....what's the work around?


From: Everett, Vernon [mailto:user-9da1a1882f49@xymon.invalid]
Sent: 05 August 2008 13:36
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Migrate hobbit data
Yes, but with a caveat.
If you change architecture, your rrd files might not survive.
If you go like for like e.g. x86 to x86, you should be fine.
However, you will have problems if you migrate from X86 to Sparc, or vice-versa.
There is a workaround, but I would rather have my head set on fire, and put out with a sledghammer.

If you are going to the same OS, and the same hardware, then it's full steam ahead, and f*** the icebergs.
Make sure your new server has all the prerequisites for Hobbit installed.
Install Hobbit. Check it starts, then shut it down.
Now simply shut down the old Hobbit installation, copy the data and config files, and start up the new one.

Your data will include ~/server/etc
And /wherever/you/put/hobbit/data
Don't forget any custom scripts in ~server/ext

Make sure the clients are pointing to the new server.
The easiest way is to change the IP address of the new server to look like the old.
Failing that, change DNS or host lookup to point ot the new server.

You should then be back in business.


From: T.J. Yang [mailto:user-8e841282cda5@xymon.invalid]
Sent: Tuesday, 5 August 2008 7:15 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] Migrate hobbit data
a very good entry for FAQ or HOWTO if it is not already in hobbitmon wiki site.
http://en.wikibooks.org/wiki/System_Monitoring_with_Hobbit/Other_Docs


tj

From: Roberts, James<mailto:user-d7df29bbad83@xymon.invalid>
Sent: Tuesday, August 05, 2008 6:00 AM
To: user-ae9b8668bcde@xymon.invalid<mailto:user-ae9b8668bcde@xymon.invalid>
Subject: [hobbit] Migrate hobbit data


I am planning to move my hobbit server install to a new server...

If it possible to migrate all the data from the old install to the new one?


James Roberts
IT Consultant - IT Services
Hampshire County Council
Room XXX,Elizabeth II Court, The Castle,
Winchester, Hants SO23 8US
Internal HPSN: (200) 5037
Tel: +XX (X)XXXX XXXXXX
Fax: +XX (X)XXXX XXXXXX
user-d7df29bbad83@xymon.invalid
Web: WWW.Hants.Gov.UK<file:///\\WWW.Hants.Gov.UK>

NOTICE: This email and any attachments are confidential.

They may contain legally privileged information or

copyright material. You must not read, copy, use or

disclose them without authorisation. If you are not an

intended recipient, please contact us at once by return

email and then delete both messages and all attachments.


NOTICE: This email and any attachments are confidential.

They may contain legally privileged information or

copyright material. You must not read, copy, use or

disclose them without authorisation. If you are not an

intended recipient, please contact us at once by return

email and then delete both messages and all attachments.

CONFIDENTIALITY NOTICE:  This email and any attachments are for the 
exclusive and confidential use of the intended recipient.  If you are not
the intended recipient, please do not read, distribute or take action in 
reliance upon this message. If you have received this in error, please 
notify us immediately by return email and promptly delete this message 
and its attachments from your computer system. We do not waive  
attorney-client or work product privilege by the transmission of this
message.
list Iain M Conochie · Wed, 06 Aug 2008 17:32:56 +0100 ·
quoted from Tom Kauffman
Everett, Vernon wrote:
Yes, but with a caveat.
If you change architecture, your rrd files might not survive.
If you go like for like e.g. x86 to x86, you should be fine.
However, you will have problems if you migrate from X86 to Sparc, or vice-versa.
There is a workaround, but I would rather have my head set on fire, and put out with a sledghammer.
 If you are going to the same OS, and the same hardware, then it's full steam ahead, and f*** the icebergs.
heh heh heh. Pure class Vern :)
list Vernon Everett · Thu, 7 Aug 2008 13:19:58 +0800 ·
 Hi all

Anybody got anything that keeps an eye on AD?

While I am asking, what about M$-Exchange?

Cheers
    Vernon

P.S. Guess who just a bunch of Windoze servers added to Hobbit. :-(
quoted from Tom Kauffman

NOTICE: This email and any attachments are confidential. They may contain legally privileged information or copyright material. You must not read, copy, use or disclose them without authorisation. If you are not an intended recipient, please contact us at once by return email and then delete both messages and all attachments.
list Graeme A Shea · Thu, 7 Aug 2008 16:52:12 +1000 ·
DCDiags and NetDiags are the basic tests to run. I run them both every
morning using the VBscript below. I have hard coded in the ignore of
some error messages that may not suit your application. I run the script
as a scheduled task and it saves the flag(log) file to the path
specified in the registry by BBWin (the big brother log path). 

You need to make sure that BBWin (or the Big Brother client) is looking
in the same directory. The original code at the being that gets this has
been commented out and replace by the GetBigBrotherPath function. I
would clean up the code but wouldn't be game to post it with out testing
it first.

Hope this is the sort of thing you are after.

Regards
Graeme

'-----------------------------------Start
Code-------------------------------------
Option Explicit
'***********************************************************************
*******************************
' Run DcDiag and NetDiag. Report result of tests to Big Brother.
' save copy of output to current folder to help diagnose any errors.
' 17/08/06 Graeme Shea
' Added ignor of dc link test. 05/09/06 Graeme Shea
' Fixed capialisation problem with ignore of dc link test. 07/09/06
Graeme Shea
' V1.3 Added ignore of concerrent error msg with error of dc link test.
14/09/06 Graeme Shea
' V1.4 Added ignore of WAN test. 1/10/06 Graeme Shea
' V1.4.1 Added ignore of FRS events from previous 24hrs. 3/12/06 Graeme
Shea
' V1.4.2 Added ignore of a syslog event from previous 24hrs. 20/02
Graeme Shea
' V1.5.0 BBWin compatable. 20/02 Graeme Shea
'***********************************************************************
********************************

Dim oShell,oFile,FSO,ExtPath, szResult, szOutPut, szDelay
Const Version = "1.4.2"

Set FSO= CreateObject("Scripting.FileSystemObject")

szDelay = "+27h" 'Sets the PURPLEDELAY for this service check - change
to match frequency of defrag

szOutput = ""

' Retrieve path to big brother log files
ExtPath = GetBigBrotherPath
Set oShell = WScript.CreateObject("WScript.Shell")
    'On Error Resume Next
	'ExtPath = oShell.RegRead("HKLM\SOFTWARE\Quest
Software\BigBrother\bbnt\ExternalPath\")
	'IF 64 bit system then reg file has moved and will raise an
error.
	'If Err then
	 '  ExtPath = oShell.RegRead("HKLM\SOFTWARE\Wow6432node\Quest
Software\BigBrother\bbnt\ExternalPath\")
	 '  err.clear
      '  End if
on Error GoTo 0

szResult = runoutput("cmd /C dcdiag.exe",1, "DcDiag.txt")
szResult = lCase(szResult)

if instr(szResult, "failed test frsevent")>0 Then
	'If the FRS is not working now will still raise error. I'm not
very concerned
	' if there was an error of some sort in the last 24hrs.
	szResult = Replace (szResult, "failed test frsevent", " ")
	szResult = Replace (szResult, "failing sysvol replication", " ")
	szOutPut = szOutPut & vbcrlf &  "&yellow FRS Event Ignored. "
	'MsgBox "in fail system log"
	
end If

if instr(szResult, "failed test systemlog")>0 Then
	'If there are errors in the system log you have allready been
advised
	' no need to have a red dot for the whole day.
	szResult = Replace (szResult, "failed test systemlog", " ")
	szOutPut = szOutPut & vbcrlf &  "&yellow System Log Error
Ignored. "
	'MsgBox "in fail system log"
	if instr(szResult, "browser service has failed to retrieve
the")>0 Then
		'MsgBox "The browser service has failed to retrieve the"
   		szResult = replace (szResult, " failed to retrieve the",
" ")
		szOutPut = szOutPut & vbcrlf &  "&yellow Browser Error
Ignored. "
	end If
	if instr(szResult, "service failed to see a directory server")>0
Then
		'MsgBox "The browser service has failed to retrieve the"
   		szResult = replace (szResult, "service failed to see a
directory server", " ")
   		szResult = replace (szResult, "service failed to see a
directory server", " ") 'Error often in pairs
		szOutPut = szOutPut & vbcrlf &  "&yellow Syslog reported
a service couldnt see the directory server. "
	end If
	
end If


' msgbox "szOutput = " & szOutPut
if instr(szResult, "fail") > 0 Then
   szOutPut = szOutPut  & VbCrLf & "&red DcDiag test failed. " & VbCrLf
& VbCrLf
   else szOutPut = szOutPut  & VbCrLf & "&green DcDiag test passed. " &
VbCrLf & VbCrLf
end If


szResult = runoutput("cmd /C netdiag.exe",1, "NetDiag.txt")
szResult = lCase(szResult)

if instr(szResult, "default gateway test . . . : failed")>0 then
   'VicSmart Routers allways seem to fail gateway test so ignore
   szResult = replace (szResult, "default gateway test . . . : failed",
" ")
   szResult = replace (szResult, "default gateway test . . . . . . . :
failed", " ")
   szOutPut = szOutPut & vbcrlf &  "&yellow NetDiag Default Gateway Test
Failure Ignored. " & VbCrLf
end If

if instr(szResult, "domain membership test . . . . . . : failed")>0 Then
   'When the Big Brother client is running under the system account it
cannot access
   ' the network to check domain membership.  If you run under another
account you
   ' can comment this section out (I think)
   szResult = replace (szResult, "domain membership test . . . . . . :
failed", " ")
   szOutPut = szOutPut & vbcrlf &  "&yellow NetDiag Domain Membership
Test Failure Ignored. " & vbcrlf
end If

if instr(szResult, "dc list test . . . . . . . . . . . : failed")>0 Then
   'When the Big Brother client is running under the system account it
cannot access
   ' the network to check domain membership.  If you run under another
account you
   ' can comment this section out (I think)
   szResult = replace (szResult, "dc list test . . . . . . . . . . . :
failed", " ")
   ' This is an error message that occurs concurrntly and causes false
detection of error
   szResult = replace (szResult, "failed to enumerate dcs by using the
browser.", " ")
   szOutPut = szOutPut & VbCrLf &  "&yellow NetDiag DC list test Test
Failure Ignored. " & VbCrLf
   
end If

if instr(szResult, "wan configuration test . . . . . . : failed")>0 Then
   szResult = replace (szResult, "wan configuration test . . . . . . :
failed", " ")
   szOutPut = szOutPut & VbCrLf &  "&yellow NetDiag WAN configuration
Test Failure Ignored. " & VbCrLf
   
end If

if instr(szResult, "fail")> 0 Then
   szOutPut = szOutPut & "&red NetDiag test failed. " & VbCrLf
   else szOutPut = szOutPut & "&green NetDiag test passed. " & vbcrlf
end If

if instr(szOutPut, "fail")>0 then
   szOutPut = "red" & szDelay & "   " & now & vbcrlf & vbcrlf & szOutPut
   else szOutPut = "green" & szDelay & "   " &Now & vbcrlf & vbcrlf &
szOutPut
end if

Set oFile = FSO.OpenTextFile(ExtPath &"\dcdiags", 2, True)
oFile.write(szOutput)
oFile.WriteBlankLines(2)
oFile.WriteLine "DCDiags Check, BBDCDiags.vbs Version " & Version
oFile.close


Function RunOutput( cProgram, nWindowType, szTempFileName )
' Run a program and save results to szTempFileName
' Got this routing of the net somewhere.
   Dim oFS
   Set oFS = CreateObject("Scripting.FileSystemObject")
   Dim oShell
   Set oShell = CreateObject( "WScript.Shell" )
   oShell.Run cProgram & " > " & szTempFileName, nWindowType, True
   Dim oFile
   Set oFile = oFS.OpenTextFile(szTempFileName, 1, True)
   RunOutput = oFile.ReadAll()
   oFile.Close
   Set oShell = Nothing
 End Function

function Convert2Text(sTemp)
	' Converts non printable characters to " " , so that Textfile is
working
	dim loopcount, tempwert, inttest
	tempwert=""
	for loopcount = 1 to len(sTemp)   ' replace all unprintable
characters  maybe easier and faster with RegEx
		 inttest = ascw(mid(sTemp,loopcount,1))
		'if ((inttest>=32) and (inttest<127)) or (inttest=10) or
(inttest=13) or (inttest=9) then
		if ((inttest>=32) and (inttest<127)) then
			 tempwert = tempwert & chr(inttest)  ' printable
Character or CR LF TAB
		 else
			 tempwert = tempwert & " "
		 end if
		'tempwert = tempwert & chr(ascb(mid(sTemp,loopcount,1)))
	next
	Convert2Text = tempwert
end function


' Get path to external log files (for BB 1.08d)
Function GetBigBrotherPath()
Dim ExtPath
On Error Resume Next
ExtPath = wshShell.RegRead("HKLM\SOFTWARE\Quest
Software\BigBrother\bbnt\ExternalPath\")
If IsEmpty(ExtPath) Then
	ExtPath = wshShell.RegRead("HKLM\SOFTWARE\BBWin\tmppath")
End If
If Not IsEmpty (ExtPath) Then  'If not empty then we have 32bit machine
	b64Bit = False
End If
If IsEmpty(ExtPath) Then
	ExtPath = wshShell.RegRead("HKLM\SOFTWARE\Wow6432node\Quest
Software\BigBrother\bbnt\ExternalPath\")
End If
If IsEmpty(ExtPath) Then
	ExtPath =
wshShell.RegRead("HKLM\SOFTWARE\Wow6432node\BBWin\tmppath")
End If

If Not IsEmpty(ExtPath) And isEmpty(b64Bit) Then 
	b64Bit = True
	err.clear
End If

If IsEmpty(ExtPath) Then
	'Put exit stuff here
End If
on Error GoTo 0
GetBigBrotherPath = ExtPath
End Function

'-----------------------------------------End
Code---------------------------------------------------------------
quoted from Vernon Everett

-----Original Message-----
From: Everett, Vernon [mailto:user-9da1a1882f49@xymon.invalid] 
Sent: Thursday, 7 August 2008 3:20 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] Monitoring AD

 
Hi all

Anybody got anything that keeps an eye on AD?

While I am asking, what about M$-Exchange?

Cheers
    Vernon

P.S. Guess who just a bunch of Windoze servers added to Hobbit. :-(

NOTICE: This email and any attachments are confidential. 
They may contain legally privileged information or 
copyright material. You must not read, copy, use or 
disclose them without authorisation. If you are not an 
intended recipient, please contact us at once by return 
email and then delete both messages and all attachments.


Important - This email and any attachments may be confidential. If received in error, please contact us and delete all copies. Before opening or using attachments check them for viruses and defects. Regardless of any loss, damage or consequence, whether caused by the negligence of the sender or not, resulting directly or indirectly from the use of any attached files our liability is limited to resupplying any affected attachments. Any representations or opinions expressed are those of the individual sender, and not necessarily those of the Department of Education and Early Childhood Development.
list Vernon Everett · Thu, 7 Aug 2008 15:02:43 +0800 ·
Thanks Graeme
Really appreciate it.

I have passed this on to out Windoze scripting guru to implement.
Will let you know how he fares.

Why have you not put this on The Shire?
If it does what it says on the tin, it's a winner, and I am sure others
will find it handy.

Cheers
    V
quoted from Graeme A Shea
 

-----Original Message-----
From: Shea, Graeme A [mailto:user-06769a90444e@xymon.invalid] 
Sent: Thursday, 7 August 2008 2:52 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Monitoring AD

DCDiags and NetDiags are the basic tests to run. I run them both every
morning using the VBscript below. I have hard coded in the ignore of
some error messages that may not suit your application. I run the script
as a scheduled task and it saves the flag(log) file to the path
specified in the registry by BBWin (the big brother log path). 

You need to make sure that BBWin (or the Big Brother client) is looking
in the same directory. The original code at the being that gets this has
been commented out and replace by the GetBigBrotherPath function. I
would clean up the code but wouldn't be game to post it with out testing
it first.

Hope this is the sort of thing you are after.

Regards
Graeme

'-----------------------------------Start
Code-------------------------------------
Option Explicit
'***********************************************************************
*******************************
' Run DcDiag and NetDiag. Report result of tests to Big Brother.
' save copy of output to current folder to help diagnose any errors.
' 17/08/06 Graeme Shea
' Added ignor of dc link test. 05/09/06 Graeme Shea ' Fixed
capialisation problem with ignore of dc link test. 07/09/06 Graeme Shea
' V1.3 Added ignore of concerrent error msg with error of dc link test.
14/09/06 Graeme Shea
' V1.4 Added ignore of WAN test. 1/10/06 Graeme Shea ' V1.4.1 Added
ignore of FRS events from previous 24hrs. 3/12/06 Graeme Shea ' V1.4.2
Added ignore of a syslog event from previous 24hrs. 20/02 Graeme Shea '
V1.5.0 BBWin compatable. 20/02 Graeme Shea
'***********************************************************************
********************************

Dim oShell,oFile,FSO,ExtPath, szResult, szOutPut, szDelay Const Version
= "1.4.2"

Set FSO= CreateObject("Scripting.FileSystemObject")

szDelay = "+27h" 'Sets the PURPLEDELAY for this service check - change
to match frequency of defrag

szOutput = ""

' Retrieve path to big brother log files ExtPath = GetBigBrotherPath Set
oShell = WScript.CreateObject("WScript.Shell")
    'On Error Resume Next
	'ExtPath = oShell.RegRead("HKLM\SOFTWARE\Quest
Software\BigBrother\bbnt\ExternalPath\")
	'IF 64 bit system then reg file has moved and will raise an
error.
	'If Err then
	 '  ExtPath = oShell.RegRead("HKLM\SOFTWARE\Wow6432node\Quest
Software\BigBrother\bbnt\ExternalPath\")
	 '  err.clear
      '  End if
on Error GoTo 0

szResult = runoutput("cmd /C dcdiag.exe",1, "DcDiag.txt") szResult =
lCase(szResult)

if instr(szResult, "failed test frsevent")>0 Then
	'If the FRS is not working now will still raise error. I'm not
very concerned
	' if there was an error of some sort in the last 24hrs.
	szResult = Replace (szResult, "failed test frsevent", " ")
	szResult = Replace (szResult, "failing sysvol replication", " ")
	szOutPut = szOutPut & vbcrlf &  "&yellow FRS Event Ignored. "
	'MsgBox "in fail system log"
	
end If

if instr(szResult, "failed test systemlog")>0 Then
	'If there are errors in the system log you have allready been
advised
	' no need to have a red dot for the whole day.
	szResult = Replace (szResult, "failed test systemlog", " ")
	szOutPut = szOutPut & vbcrlf &  "&yellow System Log Error
Ignored. "
	'MsgBox "in fail system log"
	if instr(szResult, "browser service has failed to retrieve
the")>0 Then
		'MsgBox "The browser service has failed to retrieve the"
   		szResult = replace (szResult, " failed to retrieve the",
" ")
		szOutPut = szOutPut & vbcrlf &  "&yellow Browser Error
Ignored. "
	end If
	if instr(szResult, "service failed to see a directory server")>0
Then
		'MsgBox "The browser service has failed to retrieve the"
   		szResult = replace (szResult, "service failed to see a
directory server", " ")
   		szResult = replace (szResult, "service failed to see a
directory server", " ") 'Error often in pairs
		szOutPut = szOutPut & vbcrlf &  "&yellow Syslog reported
a service couldnt see the directory server. "
	end If
	
end If


' msgbox "szOutput = " & szOutPut
if instr(szResult, "fail") > 0 Then
   szOutPut = szOutPut  & VbCrLf & "&red DcDiag test failed. " & VbCrLf
& VbCrLf
   else szOutPut = szOutPut  & VbCrLf & "&green DcDiag test passed. " &
VbCrLf & VbCrLf end If


szResult = runoutput("cmd /C netdiag.exe",1, "NetDiag.txt") szResult =
lCase(szResult)

if instr(szResult, "default gateway test . . . : failed")>0 then
   'VicSmart Routers allways seem to fail gateway test so ignore
   szResult = replace (szResult, "default gateway test . . . : failed",
" ")
   szResult = replace (szResult, "default gateway test . . . . . . . :
failed", " ")
   szOutPut = szOutPut & vbcrlf &  "&yellow NetDiag Default Gateway Test
Failure Ignored. " & VbCrLf end If

if instr(szResult, "domain membership test . . . . . . : failed")>0 Then
   'When the Big Brother client is running under the system account it
cannot access
   ' the network to check domain membership.  If you run under another
account you
   ' can comment this section out (I think)
   szResult = replace (szResult, "domain membership test . . . . . . :
failed", " ")
   szOutPut = szOutPut & vbcrlf &  "&yellow NetDiag Domain Membership
Test Failure Ignored. " & vbcrlf end If

if instr(szResult, "dc list test . . . . . . . . . . . : failed")>0 Then
   'When the Big Brother client is running under the system account it
cannot access
   ' the network to check domain membership.  If you run under another
account you
   ' can comment this section out (I think)
   szResult = replace (szResult, "dc list test . . . . . . . . . . . :
failed", " ")
   ' This is an error message that occurs concurrntly and causes false
detection of error
   szResult = replace (szResult, "failed to enumerate dcs by using the
browser.", " ")
   szOutPut = szOutPut & VbCrLf &  "&yellow NetDiag DC list test Test
Failure Ignored. " & VbCrLf
   
end If

if instr(szResult, "wan configuration test . . . . . . : failed")>0 Then
   szResult = replace (szResult, "wan configuration test . . . . . . :
failed", " ")
   szOutPut = szOutPut & VbCrLf &  "&yellow NetDiag WAN configuration
Test Failure Ignored. " & VbCrLf
   
end If

if instr(szResult, "fail")> 0 Then
   szOutPut = szOutPut & "&red NetDiag test failed. " & VbCrLf
   else szOutPut = szOutPut & "&green NetDiag test passed. " & vbcrlf
end If

if instr(szOutPut, "fail")>0 then
   szOutPut = "red" & szDelay & "   " & now & vbcrlf & vbcrlf & szOutPut
   else szOutPut = "green" & szDelay & "   " &Now & vbcrlf & vbcrlf &
szOutPut
end if

Set oFile = FSO.OpenTextFile(ExtPath &"\dcdiags", 2, True)
oFile.write(szOutput)
oFile.WriteBlankLines(2)
oFile.WriteLine "DCDiags Check, BBDCDiags.vbs Version " & Version
oFile.close


Function RunOutput( cProgram, nWindowType, szTempFileName ) ' Run a
program and save results to szTempFileName ' Got this routing of the net
somewhere.
   Dim oFS
   Set oFS = CreateObject("Scripting.FileSystemObject")
   Dim oShell
   Set oShell = CreateObject( "WScript.Shell" )
   oShell.Run cProgram & " > " & szTempFileName, nWindowType, True
   Dim oFile
   Set oFile = oFS.OpenTextFile(szTempFileName, 1, True)
   RunOutput = oFile.ReadAll()
   oFile.Close
   Set oShell = Nothing
 End Function

function Convert2Text(sTemp)
	' Converts non printable characters to " " , so that Textfile is
working
	dim loopcount, tempwert, inttest
	tempwert=""
	for loopcount = 1 to len(sTemp)   ' replace all unprintable
characters  maybe easier and faster with RegEx
		 inttest = ascw(mid(sTemp,loopcount,1))
		'if ((inttest>=32) and (inttest<127)) or (inttest=10) or
(inttest=13) or (inttest=9) then
		if ((inttest>=32) and (inttest<127)) then
			 tempwert = tempwert & chr(inttest)  ' printable
Character or CR LF TAB
		 else
			 tempwert = tempwert & " "
		 end if
		'tempwert = tempwert & chr(ascb(mid(sTemp,loopcount,1)))
	next
	Convert2Text = tempwert
end function


' Get path to external log files (for BB 1.08d) Function
GetBigBrotherPath() Dim ExtPath On Error Resume Next ExtPath =
wshShell.RegRead("HKLM\SOFTWARE\Quest
Software\BigBrother\bbnt\ExternalPath\")
If IsEmpty(ExtPath) Then
	ExtPath = wshShell.RegRead("HKLM\SOFTWARE\BBWin\tmppath")
End If
If Not IsEmpty (ExtPath) Then  'If not empty then we have 32bit machine
	b64Bit = False
End If
If IsEmpty(ExtPath) Then
	ExtPath = wshShell.RegRead("HKLM\SOFTWARE\Wow6432node\Quest
Software\BigBrother\bbnt\ExternalPath\")
End If
If IsEmpty(ExtPath) Then
	ExtPath =
wshShell.RegRead("HKLM\SOFTWARE\Wow6432node\BBWin\tmppath")
End If

If Not IsEmpty(ExtPath) And isEmpty(b64Bit) Then 
	b64Bit = True
	err.clear
End If

If IsEmpty(ExtPath) Then
	'Put exit stuff here
End If
on Error GoTo 0
GetBigBrotherPath = ExtPath
End Function

'-----------------------------------------End
Code---------------------------------------------------------------

-----Original Message-----
From: Everett, Vernon [mailto:user-9da1a1882f49@xymon.invalid]
Sent: Thursday, 7 August 2008 3:20 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] Monitoring AD

 
Hi all

Anybody got anything that keeps an eye on AD?

While I am asking, what about M$-Exchange?

Cheers
    Vernon

P.S. Guess who just a bunch of Windoze servers added to Hobbit. :-(

NOTICE: This email and any attachments are confidential. 
They may contain legally privileged information or copyright material.
You must not read, copy, use or disclose them without authorisation. If
you are not an intended recipient, please contact us at once by return
email and then delete both messages and all attachments.


Important - This email and any attachments may be confidential. If
received in error, please contact us and delete all copies. Before
opening or using attachments check them for viruses and defects.
Regardless of any loss, damage or consequence, whether caused by the
negligence of the sender or not, resulting directly or indirectly from
the use of any attached files our liability is limited to resupplying
any affected attachments. Any representations or opinions expressed are
those of the individual sender, and not necessarily those of the
Department of Education and Early Childhood Development.


NOTICE: This email and any attachments are confidential. 
They may contain legally privileged information or 
copyright material. You must not read, copy, use or 
disclose them without authorisation. If you are not an 
intended recipient, please contact us at once by return 
email and then delete both messages and all attachments.
list Massimo Morsiani · Thu, 7 Aug 2008 10:08:26 +0200 ·
Hi Graeme,

how about adding it to The Shire?


Regards.

Massimo Morsiani
Information Technology Dept.
Gilbarco S.p.a.
via de' Cattani, 220/G
50145 Firenze, Italy
tel:	+XX-XXX-XXXXX
fax:	+XX-XXX-XXXXXX
email:	user-32025d8bd22e@xymon.invalid
web:	http://www.gilbarco.it
quoted from Vernon Everett


-----Original Message-----
From: Shea, Graeme A [mailto:user-06769a90444e@xymon.invalid] 
Sent: giovedì 7 agosto 2008 8.52
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Monitoring AD

DCDiags and NetDiags are the basic tests to run. I run them both every morning using the VBscript below. I have hard coded in the ignore of some error messages that may not suit your application. I run the script as a scheduled task and it saves the flag(log) file to the path specified in the registry by BBWin (the big brother log path). 

You need to make sure that BBWin (or the Big Brother client) is looking in the same directory. The original code at the being that gets this has been commented out and replace by the GetBigBrotherPath function. I would clean up the code but wouldn't be game to post it with out testing it first.

Hope this is the sort of thing you are after.

Regards
Graeme

'-----------------------------------Start
Code-------------------------------------
Option Explicit
'***********************************************************************
*******************************
' Run DcDiag and NetDiag. Report result of tests to Big Brother.
' save copy of output to current folder to help diagnose any errors.
' 17/08/06 Graeme Shea
' Added ignor of dc link test. 05/09/06 Graeme Shea ' Fixed capialisation problem with ignore of dc link test. 07/09/06 Graeme Shea ' V1.3 Added ignore of concerrent error msg with error of dc link test.
14/09/06 Graeme Shea
' V1.4 Added ignore of WAN test. 1/10/06 Graeme Shea ' V1.4.1 Added ignore of FRS events from previous 24hrs. 3/12/06 Graeme Shea ' V1.4.2 Added ignore of a syslog event from previous 24hrs. 20/02 Graeme Shea ' V1.5.0 BBWin compatable. 20/02 Graeme Shea
'***********************************************************************
********************************

Dim oShell,oFile,FSO,ExtPath, szResult, szOutPut, szDelay Const Version = "1.4.2"

Set FSO= CreateObject("Scripting.FileSystemObject")

szDelay = "+27h" 'Sets the PURPLEDELAY for this service check - change to match frequency of defrag

szOutput = ""

' Retrieve path to big brother log files ExtPath = GetBigBrotherPath Set oShell = WScript.CreateObject("WScript.Shell")
    'On Error Resume Next
	'ExtPath = oShell.RegRead("HKLM\SOFTWARE\Quest
Software\BigBrother\bbnt\ExternalPath\")
	'IF 64 bit system then reg file has moved and will raise an error.
	'If Err then
	 '  ExtPath = oShell.RegRead("HKLM\SOFTWARE\Wow6432node\Quest
Software\BigBrother\bbnt\ExternalPath\")
	 '  err.clear
      '  End if
on Error GoTo 0

szResult = runoutput("cmd /C dcdiag.exe",1, "DcDiag.txt") szResult = lCase(szResult)

if instr(szResult, "failed test frsevent")>0 Then
	'If the FRS is not working now will still raise error. I'm not very concerned
	' if there was an error of some sort in the last 24hrs.
	szResult = Replace (szResult, "failed test frsevent", " ")
	szResult = Replace (szResult, "failing sysvol replication", " ")
	szOutPut = szOutPut & vbcrlf &  "&yellow FRS Event Ignored. "
	'MsgBox "in fail system log"
	
end If

if instr(szResult, "failed test systemlog")>0 Then
	'If there are errors in the system log you have allready been advised
	' no need to have a red dot for the whole day.
	szResult = Replace (szResult, "failed test systemlog", " ")
	szOutPut = szOutPut & vbcrlf &  "&yellow System Log Error Ignored. "
	'MsgBox "in fail system log"
	if instr(szResult, "browser service has failed to retrieve the")>0 Then
		'MsgBox "The browser service has failed to retrieve the"
   		szResult = replace (szResult, " failed to retrieve the", " ")
		szOutPut = szOutPut & vbcrlf &  "&yellow Browser Error Ignored. "
	end If
	if instr(szResult, "service failed to see a directory server")>0 Then
		'MsgBox "The browser service has failed to retrieve the"
   		szResult = replace (szResult, "service failed to see a directory server", " ")
   		szResult = replace (szResult, "service failed to see a directory server", " ") 'Error often in pairs
		szOutPut = szOutPut & vbcrlf &  "&yellow Syslog reported a service couldnt see the directory server. "
	end If
	
end If


' msgbox "szOutput = " & szOutPut
if instr(szResult, "fail") > 0 Then
   szOutPut = szOutPut  & VbCrLf & "&red DcDiag test failed. " & VbCrLf & VbCrLf
   else szOutPut = szOutPut  & VbCrLf & "&green DcDiag test passed. " & VbCrLf & VbCrLf end If


szResult = runoutput("cmd /C netdiag.exe",1, "NetDiag.txt") szResult = lCase(szResult)

if instr(szResult, "default gateway test . . . : failed")>0 then
   'VicSmart Routers allways seem to fail gateway test so ignore
   szResult = replace (szResult, "default gateway test . . . : failed", " ")
   szResult = replace (szResult, "default gateway test . . . . . . . :
failed", " ")
   szOutPut = szOutPut & vbcrlf &  "&yellow NetDiag Default Gateway Test Failure Ignored. " & VbCrLf end If

if instr(szResult, "domain membership test . . . . . . : failed")>0 Then
   'When the Big Brother client is running under the system account it cannot access
   ' the network to check domain membership.  If you run under another account you
   ' can comment this section out (I think)
   szResult = replace (szResult, "domain membership test . . . . . . :
failed", " ")
   szOutPut = szOutPut & vbcrlf &  "&yellow NetDiag Domain Membership Test Failure Ignored. " & vbcrlf end If

if instr(szResult, "dc list test . . . . . . . . . . . : failed")>0 Then
   'When the Big Brother client is running under the system account it cannot access
   ' the network to check domain membership.  If you run under another account you
   ' can comment this section out (I think)
   szResult = replace (szResult, "dc list test . . . . . . . . . . . :
failed", " ")
   ' This is an error message that occurs concurrntly and causes false detection of error
   szResult = replace (szResult, "failed to enumerate dcs by using the browser.", " ")
   szOutPut = szOutPut & VbCrLf &  "&yellow NetDiag DC list test Test Failure Ignored. " & VbCrLf
   
end If

if instr(szResult, "wan configuration test . . . . . . : failed")>0 Then
   szResult = replace (szResult, "wan configuration test . . . . . . :
failed", " ")
   szOutPut = szOutPut & VbCrLf &  "&yellow NetDiag WAN configuration Test Failure Ignored. " & VbCrLf
   
end If

if instr(szResult, "fail")> 0 Then
   szOutPut = szOutPut & "&red NetDiag test failed. " & VbCrLf
   else szOutPut = szOutPut & "&green NetDiag test passed. " & vbcrlf end If

if instr(szOutPut, "fail")>0 then
   szOutPut = "red" & szDelay & "   " & now & vbcrlf & vbcrlf & szOutPut
   else szOutPut = "green" & szDelay & "   " &Now & vbcrlf & vbcrlf &
szOutPut
end if

Set oFile = FSO.OpenTextFile(ExtPath &"\dcdiags", 2, True)
oFile.write(szOutput)
oFile.WriteBlankLines(2)
oFile.WriteLine "DCDiags Check, BBDCDiags.vbs Version " & Version oFile.close


Function RunOutput( cProgram, nWindowType, szTempFileName ) ' Run a program and save results to szTempFileName ' Got this routing of the net somewhere.
   Dim oFS
   Set oFS = CreateObject("Scripting.FileSystemObject")
   Dim oShell
   Set oShell = CreateObject( "WScript.Shell" )
   oShell.Run cProgram & " > " & szTempFileName, nWindowType, True
   Dim oFile
   Set oFile = oFS.OpenTextFile(szTempFileName, 1, True)
   RunOutput = oFile.ReadAll()
   oFile.Close
   Set oShell = Nothing
 End Function

function Convert2Text(sTemp)
	' Converts non printable characters to " " , so that Textfile is working
	dim loopcount, tempwert, inttest
	tempwert=""
	for loopcount = 1 to len(sTemp)   ' replace all unprintable
characters  maybe easier and faster with RegEx
		 inttest = ascw(mid(sTemp,loopcount,1))
		'if ((inttest>=32) and (inttest<127)) or (inttest=10) or
(inttest=13) or (inttest=9) then
		if ((inttest>=32) and (inttest<127)) then
			 tempwert = tempwert & chr(inttest)  ' printable Character or CR LF TAB
		 else
			 tempwert = tempwert & " "
		 end if
		'tempwert = tempwert & chr(ascb(mid(sTemp,loopcount,1)))
	next
	Convert2Text = tempwert
end function


' Get path to external log files (for BB 1.08d) Function GetBigBrotherPath() Dim ExtPath On Error Resume Next ExtPath = wshShell.RegRead("HKLM\SOFTWARE\Quest
Software\BigBrother\bbnt\ExternalPath\")
If IsEmpty(ExtPath) Then
	ExtPath = wshShell.RegRead("HKLM\SOFTWARE\BBWin\tmppath")
End If
If Not IsEmpty (ExtPath) Then  'If not empty then we have 32bit machine
	b64Bit = False
End If
If IsEmpty(ExtPath) Then
	ExtPath = wshShell.RegRead("HKLM\SOFTWARE\Wow6432node\Quest
Software\BigBrother\bbnt\ExternalPath\")
End If
If IsEmpty(ExtPath) Then
	ExtPath =
wshShell.RegRead("HKLM\SOFTWARE\Wow6432node\BBWin\tmppath")
End If

If Not IsEmpty(ExtPath) And isEmpty(b64Bit) Then 
	b64Bit = True
	err.clear
End If

If IsEmpty(ExtPath) Then
	'Put exit stuff here
End If
on Error GoTo 0
GetBigBrotherPath = ExtPath
End Function

'-----------------------------------------End
Code---------------------------------------------------------------

-----Original Message-----
From: Everett, Vernon [mailto:user-9da1a1882f49@xymon.invalid]
Sent: Thursday, 7 August 2008 3:20 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] Monitoring AD

 
Hi all

Anybody got anything that keeps an eye on AD?

While I am asking, what about M$-Exchange?

Cheers
    Vernon

P.S. Guess who just a bunch of Windoze servers added to Hobbit. :-(

NOTICE: This email and any attachments are confidential. 
They may contain legally privileged information or copyright material. You must not read, copy, use or disclose them without authorisation. If you are not an intended recipient, please contact us at once by return email and then delete both messages and all attachments.


Important - This email and any attachments may be confidential. If received in error, please contact us and delete all copies. Before opening or using attachments check them for viruses and defects. Regardless of any loss, damage or consequence, whether caused by the negligence of the sender or not, resulting directly or indirectly from the use of any attached files our liability is limited to resupplying any affected attachments. Any representations or opinions expressed are those of the individual sender, and not necessarily those of the Department of Education and Early Childhood Development.


This message (including any attachments) contains confidential 
and/or proprietary information intended only for the addressee.  
Any unauthorized disclosure, copying, distribution or reliance on 
the contents of this information is strictly prohibited and may 
constitute a violation of law.  If you are not the intended 
recipient, please notify the sender immediately by responding to 
this e-mail, and delete the message from your system.  If you 
have any questions about this e-mail please notify the sender 
immediately.
list Graeme A Shea · Thu, 7 Aug 2008 18:15:35 +1000 ·
I'm happy to submit this one and the other windows scripts I have. I did try once but couldn't get it in for some reason. The shire has changed quite a bit since then so I just need to have another try.

Regards
Graeme
quoted from Massimo Morsiani

-----Original Message-----
From: Morsiani, Massimo [mailto:user-32025d8bd22e@xymon.invalid] 
Sent: Thursday, 7 August 2008 6:08 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Monitoring AD

Hi Graeme,

how about adding it to The Shire?


Regards.

Massimo Morsiani
Information Technology Dept.
Gilbarco S.p.a.
via de' Cattani, 220/G
50145 Firenze, Italy
tel:	+XX-XXX-XXXXX
fax:	+XX-XXX-XXXXXX
email:	user-32025d8bd22e@xymon.invalid
web:	http://www.gilbarco.it


-----Original Message-----
From: Shea, Graeme A [mailto:user-06769a90444e@xymon.invalid] 
Sent: giovedì 7 agosto 2008 8.52
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Monitoring AD

DCDiags and NetDiags are the basic tests to run. I run them both every morning using the VBscript below. I have hard coded in the ignore of some error messages that may not suit your application. I run the script as a scheduled task and it saves the flag(log) file to the path specified in the registry by BBWin (the big brother log path). 

You need to make sure that BBWin (or the Big Brother client) is looking in the same directory. The original code at the being that gets this has been commented out and replace by the GetBigBrotherPath function. I would clean up the code but wouldn't be game to post it with out testing it first.

Hope this is the sort of thing you are after.

Regards
Graeme

'-----------------------------------Start
Code-------------------------------------
Option Explicit
'***********************************************************************
*******************************
' Run DcDiag and NetDiag. Report result of tests to Big Brother.
' save copy of output to current folder to help diagnose any errors.
' 17/08/06 Graeme Shea
' Added ignor of dc link test. 05/09/06 Graeme Shea ' Fixed capialisation problem with ignore of dc link test. 07/09/06 Graeme Shea ' V1.3 Added ignore of concerrent error msg with error of dc link test.
14/09/06 Graeme Shea
' V1.4 Added ignore of WAN test. 1/10/06 Graeme Shea ' V1.4.1 Added ignore of FRS events from previous 24hrs. 3/12/06 Graeme Shea ' V1.4.2 Added ignore of a syslog event from previous 24hrs. 20/02 Graeme Shea ' V1.5.0 BBWin compatable. 20/02 Graeme Shea
'***********************************************************************
********************************

Dim oShell,oFile,FSO,ExtPath, szResult, szOutPut, szDelay Const Version = "1.4.2"

Set FSO= CreateObject("Scripting.FileSystemObject")

szDelay = "+27h" 'Sets the PURPLEDELAY for this service check - change to match frequency of defrag

szOutput = ""

' Retrieve path to big brother log files ExtPath = GetBigBrotherPath Set oShell = WScript.CreateObject("WScript.Shell")
    'On Error Resume Next
	'ExtPath = oShell.RegRead("HKLM\SOFTWARE\Quest
Software\BigBrother\bbnt\ExternalPath\")
	'IF 64 bit system then reg file has moved and will raise an error.
	'If Err then
	 '  ExtPath = oShell.RegRead("HKLM\SOFTWARE\Wow6432node\Quest
Software\BigBrother\bbnt\ExternalPath\")
	 '  err.clear
      '  End if
on Error GoTo 0

szResult = runoutput("cmd /C dcdiag.exe",1, "DcDiag.txt") szResult = lCase(szResult)

if instr(szResult, "failed test frsevent")>0 Then
	'If the FRS is not working now will still raise error. I'm not very concerned
	' if there was an error of some sort in the last 24hrs.
	szResult = Replace (szResult, "failed test frsevent", " ")
	szResult = Replace (szResult, "failing sysvol replication", " ")
	szOutPut = szOutPut & vbcrlf &  "&yellow FRS Event Ignored. "
	'MsgBox "in fail system log"
	
end If

if instr(szResult, "failed test systemlog")>0 Then
	'If there are errors in the system log you have allready been advised
	' no need to have a red dot for the whole day.
	szResult = Replace (szResult, "failed test systemlog", " ")
	szOutPut = szOutPut & vbcrlf &  "&yellow System Log Error Ignored. "
	'MsgBox "in fail system log"
	if instr(szResult, "browser service has failed to retrieve the")>0 Then
		'MsgBox "The browser service has failed to retrieve the"
   		szResult = replace (szResult, " failed to retrieve the", " ")
		szOutPut = szOutPut & vbcrlf &  "&yellow Browser Error Ignored. "
	end If
	if instr(szResult, "service failed to see a directory server")>0 Then
		'MsgBox "The browser service has failed to retrieve the"
   		szResult = replace (szResult, "service failed to see a directory server", " ")
   		szResult = replace (szResult, "service failed to see a directory server", " ") 'Error often in pairs
		szOutPut = szOutPut & vbcrlf &  "&yellow Syslog reported a service couldnt see the directory server. "
	end If
	
end If


' msgbox "szOutput = " & szOutPut
if instr(szResult, "fail") > 0 Then
   szOutPut = szOutPut  & VbCrLf & "&red DcDiag test failed. " & VbCrLf & VbCrLf
   else szOutPut = szOutPut  & VbCrLf & "&green DcDiag test passed. " & VbCrLf & VbCrLf end If


szResult = runoutput("cmd /C netdiag.exe",1, "NetDiag.txt") szResult = lCase(szResult)

if instr(szResult, "default gateway test . . . : failed")>0 then
   'VicSmart Routers allways seem to fail gateway test so ignore
   szResult = replace (szResult, "default gateway test . . . : failed", " ")
   szResult = replace (szResult, "default gateway test . . . . . . . :
failed", " ")
   szOutPut = szOutPut & vbcrlf &  "&yellow NetDiag Default Gateway Test Failure Ignored. " & VbCrLf end If

if instr(szResult, "domain membership test . . . . . . : failed")>0 Then
   'When the Big Brother client is running under the system account it cannot access
   ' the network to check domain membership.  If you run under another account you
   ' can comment this section out (I think)
   szResult = replace (szResult, "domain membership test . . . . . . :
failed", " ")
   szOutPut = szOutPut & vbcrlf &  "&yellow NetDiag Domain Membership Test Failure Ignored. " & vbcrlf end If

if instr(szResult, "dc list test . . . . . . . . . . . : failed")>0 Then
   'When the Big Brother client is running under the system account it cannot access
   ' the network to check domain membership.  If you run under another account you
   ' can comment this section out (I think)
   szResult = replace (szResult, "dc list test . . . . . . . . . . . :
failed", " ")
   ' This is an error message that occurs concurrntly and causes false detection of error
   szResult = replace (szResult, "failed to enumerate dcs by using the browser.", " ")
   szOutPut = szOutPut & VbCrLf &  "&yellow NetDiag DC list test Test Failure Ignored. " & VbCrLf
   
end If

if instr(szResult, "wan configuration test . . . . . . : failed")>0 Then
   szResult = replace (szResult, "wan configuration test . . . . . . :
failed", " ")
   szOutPut = szOutPut & VbCrLf &  "&yellow NetDiag WAN configuration Test Failure Ignored. " & VbCrLf
   
end If

if instr(szResult, "fail")> 0 Then
   szOutPut = szOutPut & "&red NetDiag test failed. " & VbCrLf
   else szOutPut = szOutPut & "&green NetDiag test passed. " & vbcrlf end If

if instr(szOutPut, "fail")>0 then
   szOutPut = "red" & szDelay & "   " & now & vbcrlf & vbcrlf & szOutPut
   else szOutPut = "green" & szDelay & "   " &Now & vbcrlf & vbcrlf &
szOutPut
end if

Set oFile = FSO.OpenTextFile(ExtPath &"\dcdiags", 2, True)
oFile.write(szOutput)
oFile.WriteBlankLines(2)
oFile.WriteLine "DCDiags Check, BBDCDiags.vbs Version " & Version oFile.close


Function RunOutput( cProgram, nWindowType, szTempFileName ) ' Run a program and save results to szTempFileName ' Got this routing of the net somewhere.
   Dim oFS
   Set oFS = CreateObject("Scripting.FileSystemObject")
   Dim oShell
   Set oShell = CreateObject( "WScript.Shell" )
   oShell.Run cProgram & " > " & szTempFileName, nWindowType, True
   Dim oFile
   Set oFile = oFS.OpenTextFile(szTempFileName, 1, True)
   RunOutput = oFile.ReadAll()
   oFile.Close
   Set oShell = Nothing
 End Function

function Convert2Text(sTemp)
	' Converts non printable characters to " " , so that Textfile is working
	dim loopcount, tempwert, inttest
	tempwert=""
	for loopcount = 1 to len(sTemp)   ' replace all unprintable
characters  maybe easier and faster with RegEx
		 inttest = ascw(mid(sTemp,loopcount,1))
		'if ((inttest>=32) and (inttest<127)) or (inttest=10) or
(inttest=13) or (inttest=9) then
		if ((inttest>=32) and (inttest<127)) then
			 tempwert = tempwert & chr(inttest)  ' printable Character or CR LF TAB
		 else
			 tempwert = tempwert & " "
		 end if
		'tempwert = tempwert & chr(ascb(mid(sTemp,loopcount,1)))
	next
	Convert2Text = tempwert
end function


' Get path to external log files (for BB 1.08d) Function GetBigBrotherPath() Dim ExtPath On Error Resume Next ExtPath = wshShell.RegRead("HKLM\SOFTWARE\Quest
Software\BigBrother\bbnt\ExternalPath\")
If IsEmpty(ExtPath) Then
	ExtPath = wshShell.RegRead("HKLM\SOFTWARE\BBWin\tmppath")
End If
If Not IsEmpty (ExtPath) Then  'If not empty then we have 32bit machine
	b64Bit = False
End If
If IsEmpty(ExtPath) Then
	ExtPath = wshShell.RegRead("HKLM\SOFTWARE\Wow6432node\Quest
Software\BigBrother\bbnt\ExternalPath\")
End If
If IsEmpty(ExtPath) Then
	ExtPath =
wshShell.RegRead("HKLM\SOFTWARE\Wow6432node\BBWin\tmppath")
End If

If Not IsEmpty(ExtPath) And isEmpty(b64Bit) Then 
	b64Bit = True
	err.clear
End If

If IsEmpty(ExtPath) Then
	'Put exit stuff here
End If
on Error GoTo 0
GetBigBrotherPath = ExtPath
End Function

'-----------------------------------------End
Code---------------------------------------------------------------

-----Original Message-----
From: Everett, Vernon [mailto:user-9da1a1882f49@xymon.invalid]
Sent: Thursday, 7 August 2008 3:20 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] Monitoring AD

 
Hi all

Anybody got anything that keeps an eye on AD?

While I am asking, what about M$-Exchange?

Cheers
    Vernon

P.S. Guess who just a bunch of Windoze servers added to Hobbit. :-(

NOTICE: This email and any attachments are confidential. 
They may contain legally privileged information or copyright material. You must not read, copy, use or disclose them without authorisation. If you are not an intended recipient, please contact us at once by return email and then delete both messages and all attachments.


Important - This email and any attachments may be confidential. If received in error, please contact us and delete all copies. Before opening or using attachments check them for viruses and defects. Regardless of any loss, damage or consequence, whether caused by the negligence of the sender or not, resulting directly or indirectly from the use of any attached files our liability is limited to resupplying any affected attachments. Any representations or opinions expressed are those of the individual sender, and not necessarily those of the Department of Education and Early Childhood Development.


This message (including any attachments) contains confidential 
and/or proprietary information intended only for the addressee.  
Any unauthorized disclosure, copying, distribution or reliance on 
the contents of this information is strictly prohibited and may 
constitute a violation of law.  If you are not the intended 
recipient, please notify the sender immediately by responding to 
this e-mail, and delete the message from your system.  If you 
have any questions about this e-mail please notify the sender 
immediately.


Important - This email and any attachments may be confidential. If received in error, please contact us and delete all copies. Before opening or using attachments check them for viruses and defects. Regardless of any loss, damage or consequence, whether caused by the negligence of the sender or not, resulting directly or indirectly from the use of any attached files our liability is limited to resupplying any affected attachments. Any representations or opinions expressed are those of the individual sender, and not necessarily those of the Department of Education and Early Childhood Development.
list Massimo Morsiani · Thu, 7 Aug 2008 10:24:55 +0200 ·
Hi Graeme,

try to ask to Galen to have support for adding your scripts.
Thanks for your work.
quoted from Graeme A Shea


Regards.

Massimo Morsiani
Information Technology Dept.
Gilbarco S.p.a.
via de' Cattani, 220/G
50145 Firenze, Italy
tel:	+XX-XXX-XXXXX
fax:	+XX-XXX-XXXXXX
email:	user-32025d8bd22e@xymon.invalid
web:	http://www.gilbarco.it


-----Original Message-----
From: Shea, Graeme A [mailto:user-06769a90444e@xymon.invalid] 
Sent: giovedì 7 agosto 2008 10.16
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Monitoring AD

I'm happy to submit this one and the other windows scripts I have. I did try once but couldn't get it in for some reason. The shire has changed quite a bit since then so I just need to have another try.

Regards
Graeme

-----Original Message-----
From: Morsiani, Massimo [mailto:user-32025d8bd22e@xymon.invalid]
Sent: Thursday, 7 August 2008 6:08 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Monitoring AD

Hi Graeme,

how about adding it to The Shire?


Regards.

Massimo Morsiani
Information Technology Dept.
Gilbarco S.p.a.
via de' Cattani, 220/G
50145 Firenze, Italy
tel:	+XX-XXX-XXXXX
fax:	+XX-XXX-XXXXXX
email:	user-32025d8bd22e@xymon.invalid
web:	http://www.gilbarco.it


-----Original Message-----
From: Shea, Graeme A [mailto:user-06769a90444e@xymon.invalid]
Sent: giovedì 7 agosto 2008 8.52
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Monitoring AD

DCDiags and NetDiags are the basic tests to run. I run them both every morning using the VBscript below. I have hard coded in the ignore of some error messages that may not suit your application. I run the script as a scheduled task and it saves the flag(log) file to the path specified in the registry by BBWin (the big brother log path). 

You need to make sure that BBWin (or the Big Brother client) is looking in the same directory. The original code at the being that gets this has been commented out and replace by the GetBigBrotherPath function. I would clean up the code but wouldn't be game to post it with out testing it first.

Hope this is the sort of thing you are after.

Regards
Graeme

'-----------------------------------Start
Code-------------------------------------
Option Explicit
'***********************************************************************
*******************************
' Run DcDiag and NetDiag. Report result of tests to Big Brother.
' save copy of output to current folder to help diagnose any errors.
' 17/08/06 Graeme Shea
' Added ignor of dc link test. 05/09/06 Graeme Shea ' Fixed capialisation problem with ignore of dc link test. 07/09/06 Graeme Shea ' V1.3 Added ignore of concerrent error msg with error of dc link test.
14/09/06 Graeme Shea
' V1.4 Added ignore of WAN test. 1/10/06 Graeme Shea ' V1.4.1 Added ignore of FRS events from previous 24hrs. 3/12/06 Graeme Shea ' V1.4.2 Added ignore of a syslog event from previous 24hrs. 20/02 Graeme Shea ' V1.5.0 BBWin compatable. 20/02 Graeme Shea
'***********************************************************************
********************************

Dim oShell,oFile,FSO,ExtPath, szResult, szOutPut, szDelay Const Version = "1.4.2"

Set FSO= CreateObject("Scripting.FileSystemObject")

szDelay = "+27h" 'Sets the PURPLEDELAY for this service check - change to match frequency of defrag

szOutput = ""

' Retrieve path to big brother log files ExtPath = GetBigBrotherPath Set oShell = WScript.CreateObject("WScript.Shell")
    'On Error Resume Next
	'ExtPath = oShell.RegRead("HKLM\SOFTWARE\Quest
Software\BigBrother\bbnt\ExternalPath\")
	'IF 64 bit system then reg file has moved and will raise an error.
	'If Err then
	 '  ExtPath = oShell.RegRead("HKLM\SOFTWARE\Wow6432node\Quest
Software\BigBrother\bbnt\ExternalPath\")
	 '  err.clear
      '  End if
on Error GoTo 0

szResult = runoutput("cmd /C dcdiag.exe",1, "DcDiag.txt") szResult = lCase(szResult)

if instr(szResult, "failed test frsevent")>0 Then
	'If the FRS is not working now will still raise error. I'm not very concerned
	' if there was an error of some sort in the last 24hrs.
	szResult = Replace (szResult, "failed test frsevent", " ")
	szResult = Replace (szResult, "failing sysvol replication", " ")
	szOutPut = szOutPut & vbcrlf &  "&yellow FRS Event Ignored. "
	'MsgBox "in fail system log"
	
end If

if instr(szResult, "failed test systemlog")>0 Then
	'If there are errors in the system log you have allready been advised
	' no need to have a red dot for the whole day.
	szResult = Replace (szResult, "failed test systemlog", " ")
	szOutPut = szOutPut & vbcrlf &  "&yellow System Log Error Ignored. "
	'MsgBox "in fail system log"
	if instr(szResult, "browser service has failed to retrieve the")>0 Then
		'MsgBox "The browser service has failed to retrieve the"
   		szResult = replace (szResult, " failed to retrieve the", " ")
		szOutPut = szOutPut & vbcrlf &  "&yellow Browser Error Ignored. "
	end If
	if instr(szResult, "service failed to see a directory server")>0 Then
		'MsgBox "The browser service has failed to retrieve the"
   		szResult = replace (szResult, "service failed to see a directory server", " ")
   		szResult = replace (szResult, "service failed to see a directory server", " ") 'Error often in pairs
		szOutPut = szOutPut & vbcrlf &  "&yellow Syslog reported a service couldnt see the directory server. "
	end If
	
end If


' msgbox "szOutput = " & szOutPut
if instr(szResult, "fail") > 0 Then
   szOutPut = szOutPut  & VbCrLf & "&red DcDiag test failed. " & VbCrLf & VbCrLf
   else szOutPut = szOutPut  & VbCrLf & "&green DcDiag test passed. " & VbCrLf & VbCrLf end If


szResult = runoutput("cmd /C netdiag.exe",1, "NetDiag.txt") szResult = lCase(szResult)

if instr(szResult, "default gateway test . . . : failed")>0 then
   'VicSmart Routers allways seem to fail gateway test so ignore
   szResult = replace (szResult, "default gateway test . . . : failed", " ")
   szResult = replace (szResult, "default gateway test . . . . . . . :
failed", " ")
   szOutPut = szOutPut & vbcrlf &  "&yellow NetDiag Default Gateway Test Failure Ignored. " & VbCrLf end If

if instr(szResult, "domain membership test . . . . . . : failed")>0 Then
   'When the Big Brother client is running under the system account it cannot access
   ' the network to check domain membership.  If you run under another account you
   ' can comment this section out (I think)
   szResult = replace (szResult, "domain membership test . . . . . . :
failed", " ")
   szOutPut = szOutPut & vbcrlf &  "&yellow NetDiag Domain Membership Test Failure Ignored. " & vbcrlf end If

if instr(szResult, "dc list test . . . . . . . . . . . : failed")>0 Then
   'When the Big Brother client is running under the system account it cannot access
   ' the network to check domain membership.  If you run under another account you
   ' can comment this section out (I think)
   szResult = replace (szResult, "dc list test . . . . . . . . . . . :
failed", " ")
   ' This is an error message that occurs concurrntly and causes false detection of error
   szResult = replace (szResult, "failed to enumerate dcs by using the browser.", " ")
   szOutPut = szOutPut & VbCrLf &  "&yellow NetDiag DC list test Test Failure Ignored. " & VbCrLf
   
end If

if instr(szResult, "wan configuration test . . . . . . : failed")>0 Then
   szResult = replace (szResult, "wan configuration test . . . . . . :
failed", " ")
   szOutPut = szOutPut & VbCrLf &  "&yellow NetDiag WAN configuration Test Failure Ignored. " & VbCrLf
   
end If

if instr(szResult, "fail")> 0 Then
   szOutPut = szOutPut & "&red NetDiag test failed. " & VbCrLf
   else szOutPut = szOutPut & "&green NetDiag test passed. " & vbcrlf end If

if instr(szOutPut, "fail")>0 then
   szOutPut = "red" & szDelay & "   " & now & vbcrlf & vbcrlf & szOutPut
   else szOutPut = "green" & szDelay & "   " &Now & vbcrlf & vbcrlf &
szOutPut
end if

Set oFile = FSO.OpenTextFile(ExtPath &"\dcdiags", 2, True)
oFile.write(szOutput)
oFile.WriteBlankLines(2)
oFile.WriteLine "DCDiags Check, BBDCDiags.vbs Version " & Version oFile.close


Function RunOutput( cProgram, nWindowType, szTempFileName ) ' Run a program and save results to szTempFileName ' Got this routing of the net somewhere.
   Dim oFS
   Set oFS = CreateObject("Scripting.FileSystemObject")
   Dim oShell
   Set oShell = CreateObject( "WScript.Shell" )
   oShell.Run cProgram & " > " & szTempFileName, nWindowType, True
   Dim oFile
   Set oFile = oFS.OpenTextFile(szTempFileName, 1, True)
   RunOutput = oFile.ReadAll()
   oFile.Close
   Set oShell = Nothing
 End Function

function Convert2Text(sTemp)
	' Converts non printable characters to " " , so that Textfile is working
	dim loopcount, tempwert, inttest
	tempwert=""
	for loopcount = 1 to len(sTemp)   ' replace all unprintable
characters  maybe easier and faster with RegEx
		 inttest = ascw(mid(sTemp,loopcount,1))
		'if ((inttest>=32) and (inttest<127)) or (inttest=10) or
(inttest=13) or (inttest=9) then
		if ((inttest>=32) and (inttest<127)) then
			 tempwert = tempwert & chr(inttest)  ' printable Character or CR LF TAB
		 else
			 tempwert = tempwert & " "
		 end if
		'tempwert = tempwert & chr(ascb(mid(sTemp,loopcount,1)))
	next
	Convert2Text = tempwert
end function


' Get path to external log files (for BB 1.08d) Function GetBigBrotherPath() Dim ExtPath On Error Resume Next ExtPath = wshShell.RegRead("HKLM\SOFTWARE\Quest
Software\BigBrother\bbnt\ExternalPath\")
If IsEmpty(ExtPath) Then
	ExtPath = wshShell.RegRead("HKLM\SOFTWARE\BBWin\tmppath")
End If
If Not IsEmpty (ExtPath) Then  'If not empty then we have 32bit machine
	b64Bit = False
End If
If IsEmpty(ExtPath) Then
	ExtPath = wshShell.RegRead("HKLM\SOFTWARE\Wow6432node\Quest
Software\BigBrother\bbnt\ExternalPath\")
End If
If IsEmpty(ExtPath) Then
	ExtPath =
wshShell.RegRead("HKLM\SOFTWARE\Wow6432node\BBWin\tmppath")
End If

If Not IsEmpty(ExtPath) And isEmpty(b64Bit) Then 
	b64Bit = True
	err.clear
End If

If IsEmpty(ExtPath) Then
	'Put exit stuff here
End If
on Error GoTo 0
GetBigBrotherPath = ExtPath
End Function

'-----------------------------------------End
Code---------------------------------------------------------------

-----Original Message-----
From: Everett, Vernon [mailto:user-9da1a1882f49@xymon.invalid]
Sent: Thursday, 7 August 2008 3:20 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] Monitoring AD

 
Hi all

Anybody got anything that keeps an eye on AD?

While I am asking, what about M$-Exchange?

Cheers
    Vernon

P.S. Guess who just a bunch of Windoze servers added to Hobbit. :-(

NOTICE: This email and any attachments are confidential. 
They may contain legally privileged information or copyright material. You must not read, copy, use or disclose them without authorisation. If you are not an intended recipient, please contact us at once by return email and then delete both messages and all attachments.


Important - This email and any attachments may be confidential. If received in error, please contact us and delete all copies. Before opening or using attachments check them for viruses and defects. Regardless of any loss, damage or consequence, whether caused by the negligence of the sender or not, resulting directly or indirectly from the use of any attached files our liability is limited to resupplying any affected attachments. Any representations or opinions expressed are those of the individual sender, and not necessarily those of the Department of Education and Early Childhood Development.


This message (including any attachments) contains confidential and/or proprietary information intended only for the addressee.  
Any unauthorized disclosure, copying, distribution or reliance on the contents of this information is strictly prohibited and may constitute a violation of law.  If you are not the intended recipient, please notify the sender immediately by responding to this e-mail, and delete the message from your system.  If you have any questions about this e-mail please notify the sender immediately.


Important - This email and any attachments may be confidential. If received in error, please contact us and delete all copies. Before opening or using attachments check them for viruses and defects. Regardless of any loss, damage or consequence, whether caused by the negligence of the sender or not, resulting directly or indirectly from the use of any attached files our liability is limited to resupplying any affected attachments. Any representations or opinions expressed are those of the individual sender, and not necessarily those of the Department of Education and Early Childhood Development.


This message (including any attachments) contains confidential 
and/or proprietary information intended only for the addressee.  
Any unauthorized disclosure, copying, distribution or reliance on 
the contents of this information is strictly prohibited and may 
constitute a violation of law.  If you are not the intended 
recipient, please notify the sender immediately by responding to 
this e-mail, and delete the message from your system.  If you 
have any questions about this e-mail please notify the sender 
immediately.
list Galen Johnson · Thu, 7 Aug 2008 07:23:24 -0400 ·
No need to ask :-).  I've opened it up...it just requires you create an account to add content.

=G=
quoted from Massimo Morsiani

From: Morsiani, Massimo [user-32025d8bd22e@xymon.invalid]
Sent: Thursday, August 07, 2008 4:24 AM
To: user-ae9b8668bcde@xymon.invalid
Cc: Galen Johnson
Subject: RE: [hobbit] Monitoring AD

Hi Graeme,

try to ask to Galen to have support for adding your scripts.
Thanks for your work.


Regards.

Massimo Morsiani
Information Technology Dept.
Gilbarco S.p.a.
via de' Cattani, 220/G
50145 Firenze, Italy
tel:    +XX-XXX-XXXXX
fax:    +XX-XXX-XXXXXX
email:  user-32025d8bd22e@xymon.invalid
web:    http://www.gilbarco.it


-----Original Message-----
From: Shea, Graeme A [mailto:user-06769a90444e@xymon.invalid]
Sent: giovedì 7 agosto 2008 10.16
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Monitoring AD

I'm happy to submit this one and the other windows scripts I have. I did try once but couldn't get it in for some reason. The shire has changed quite a bit since then so I just need to have another try.

Regards
Graeme

-----Original Message-----
From: Morsiani, Massimo [mailto:user-32025d8bd22e@xymon.invalid]
Sent: Thursday, 7 August 2008 6:08 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Monitoring AD

Hi Graeme,

how about adding it to The Shire?


Regards.

Massimo Morsiani
Information Technology Dept.
Gilbarco S.p.a.
via de' Cattani, 220/G
50145 Firenze, Italy
tel:    +XX-XXX-XXXXX
fax:    +XX-XXX-XXXXXX
email:  user-32025d8bd22e@xymon.invalid
web:    http://www.gilbarco.it


-----Original Message-----
From: Shea, Graeme A [mailto:user-06769a90444e@xymon.invalid]
Sent: giovedì 7 agosto 2008 8.52
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] Monitoring AD

DCDiags and NetDiags are the basic tests to run. I run them both every morning using the VBscript below. I have hard coded in the ignore of some error messages that may not suit your application. I run the script as a scheduled task and it saves the flag(log) file to the path specified in the registry by BBWin (the big brother log path).

You need to make sure that BBWin (or the Big Brother client) is looking in the same directory. The original code at the being that gets this has been commented out and replace by the GetBigBrotherPath function. I would clean up the code but wouldn't be game to post it with out testing it first.

Hope this is the sort of thing you are after.

Regards
Graeme

'-----------------------------------Start
Code-------------------------------------
Option Explicit
'***********************************************************************
*******************************
' Run DcDiag and NetDiag. Report result of tests to Big Brother.
' save copy of output to current folder to help diagnose any errors.
' 17/08/06 Graeme Shea
' Added ignor of dc link test. 05/09/06 Graeme Shea ' Fixed capialisation problem with ignore of dc link test. 07/09/06 Graeme Shea ' V1.3 Added ignore of concerrent error msg with error of dc link test.
14/09/06 Graeme Shea
' V1.4 Added ignore of WAN test. 1/10/06 Graeme Shea ' V1.4.1 Added ignore of FRS events from previous 24hrs. 3/12/06 Graeme Shea ' V1.4.2 Added ignore of a syslog event from previous 24hrs. 20/02 Graeme Shea ' V1.5.0 BBWin compatable. 20/02 Graeme Shea
'***********************************************************************
********************************

Dim oShell,oFile,FSO,ExtPath, szResult, szOutPut, szDelay Const Version = "1.4.2"

Set FSO= CreateObject("Scripting.FileSystemObject")

szDelay = "+27h" 'Sets the PURPLEDELAY for this service check - change to match frequency of defrag

szOutput = ""

' Retrieve path to big brother log files ExtPath = GetBigBrotherPath Set oShell = WScript.CreateObject("WScript.Shell")
    'On Error Resume Next
        'ExtPath = oShell.RegRead("HKLM\SOFTWARE\Quest
Software\BigBrother\bbnt\ExternalPath\")
        'IF 64 bit system then reg file has moved and will raise an error.
        'If Err then
         '  ExtPath = oShell.RegRead("HKLM\SOFTWARE\Wow6432node\Quest
Software\BigBrother\bbnt\ExternalPath\")
         '  err.clear
      '  End if
on Error GoTo 0

szResult = runoutput("cmd /C dcdiag.exe",1, "DcDiag.txt") szResult = lCase(szResult)

if instr(szResult, "failed test frsevent")>0 Then
        'If the FRS is not working now will still raise error. I'm not very concerned
        ' if there was an error of some sort in the last 24hrs.
        szResult = Replace (szResult, "failed test frsevent", " ")
        szResult = Replace (szResult, "failing sysvol replication", " ")
        szOutPut = szOutPut & vbcrlf &  "&yellow FRS Event Ignored. "
        'MsgBox "in fail system log"

end If

if instr(szResult, "failed test systemlog")>0 Then
        'If there are errors in the system log you have allready been advised
        ' no need to have a red dot for the whole day.
        szResult = Replace (szResult, "failed test systemlog", " ")
        szOutPut = szOutPut & vbcrlf &  "&yellow System Log Error Ignored. "
        'MsgBox "in fail system log"
        if instr(szResult, "browser service has failed to retrieve the")>0 Then
                'MsgBox "The browser service has failed to retrieve the"
                szResult = replace (szResult, " failed to retrieve the", " ")
                szOutPut = szOutPut & vbcrlf &  "&yellow Browser Error Ignored. "
        end If
        if instr(szResult, "service failed to see a directory server")>0 Then
                'MsgBox "The browser service has failed to retrieve the"
                szResult = replace (szResult, "service failed to see a directory server", " ")
                szResult = replace (szResult, "service failed to see a directory server", " ") 'Error often in pairs
                szOutPut = szOutPut & vbcrlf &  "&yellow Syslog reported a service couldnt see the directory server. "
        end If

end If


' msgbox "szOutput = " & szOutPut
if instr(szResult, "fail") > 0 Then
   szOutPut = szOutPut  & VbCrLf & "&red DcDiag test failed. " & VbCrLf & VbCrLf
   else szOutPut = szOutPut  & VbCrLf & "&green DcDiag test passed. " & VbCrLf & VbCrLf end If


szResult = runoutput("cmd /C netdiag.exe",1, "NetDiag.txt") szResult = lCase(szResult)

if instr(szResult, "default gateway test . . . : failed")>0 then
   'VicSmart Routers allways seem to fail gateway test so ignore
   szResult = replace (szResult, "default gateway test . . . : failed", " ")
   szResult = replace (szResult, "default gateway test . . . . . . . :
failed", " ")
   szOutPut = szOutPut & vbcrlf &  "&yellow NetDiag Default Gateway Test Failure Ignored. " & VbCrLf end If

if instr(szResult, "domain membership test . . . . . . : failed")>0 Then
   'When the Big Brother client is running under the system account it cannot access
   ' the network to check domain membership.  If you run under another account you
   ' can comment this section out (I think)
   szResult = replace (szResult, "domain membership test . . . . . . :
failed", " ")
   szOutPut = szOutPut & vbcrlf &  "&yellow NetDiag Domain Membership Test Failure Ignored. " & vbcrlf end If

if instr(szResult, "dc list test . . . . . . . . . . . : failed")>0 Then
   'When the Big Brother client is running under the system account it cannot access
   ' the network to check domain membership.  If you run under another account you
   ' can comment this section out (I think)
   szResult = replace (szResult, "dc list test . . . . . . . . . . . :
failed", " ")
   ' This is an error message that occurs concurrntly and causes false detection of error
   szResult = replace (szResult, "failed to enumerate dcs by using the browser.", " ")
   szOutPut = szOutPut & VbCrLf &  "&yellow NetDiag DC list test Test Failure Ignored. " & VbCrLf

end If

if instr(szResult, "wan configuration test . . . . . . : failed")>0 Then
   szResult = replace (szResult, "wan configuration test . . . . . . :
failed", " ")
   szOutPut = szOutPut & VbCrLf &  "&yellow NetDiag WAN configuration Test Failure Ignored. " & VbCrLf

end If

if instr(szResult, "fail")> 0 Then
   szOutPut = szOutPut & "&red NetDiag test failed. " & VbCrLf
   else szOutPut = szOutPut & "&green NetDiag test passed. " & vbcrlf end If

if instr(szOutPut, "fail")>0 then
   szOutPut = "red" & szDelay & "   " & now & vbcrlf & vbcrlf & szOutPut
   else szOutPut = "green" & szDelay & "   " &Now & vbcrlf & vbcrlf &
szOutPut
end if

Set oFile = FSO.OpenTextFile(ExtPath &"\dcdiags", 2, True)
oFile.write(szOutput)
oFile.WriteBlankLines(2)
oFile.WriteLine "DCDiags Check, BBDCDiags.vbs Version " & Version oFile.close


Function RunOutput( cProgram, nWindowType, szTempFileName ) ' Run a program and save results to szTempFileName ' Got this routing of the net somewhere.
   Dim oFS
   Set oFS = CreateObject("Scripting.FileSystemObject")
   Dim oShell
   Set oShell = CreateObject( "WScript.Shell" )
   oShell.Run cProgram & " > " & szTempFileName, nWindowType, True
   Dim oFile
   Set oFile = oFS.OpenTextFile(szTempFileName, 1, True)
   RunOutput = oFile.ReadAll()
   oFile.Close
   Set oShell = Nothing
 End Function

function Convert2Text(sTemp)
        ' Converts non printable characters to " " , so that Textfile is working
        dim loopcount, tempwert, inttest
        tempwert=""
        for loopcount = 1 to len(sTemp)   ' replace all unprintable
characters  maybe easier and faster with RegEx
                 inttest = ascw(mid(sTemp,loopcount,1))
                'if ((inttest>=32) and (inttest<127)) or (inttest=10) or
(inttest=13) or (inttest=9) then
                if ((inttest>=32) and (inttest<127)) then
                         tempwert = tempwert & chr(inttest)  ' printable Character or CR LF TAB
                 else
                         tempwert = tempwert & " "
                 end if
                'tempwert = tempwert & chr(ascb(mid(sTemp,loopcount,1)))
        next
        Convert2Text = tempwert
end function


' Get path to external log files (for BB 1.08d) Function GetBigBrotherPath() Dim ExtPath On Error Resume Next ExtPath = wshShell.RegRead("HKLM\SOFTWARE\Quest
Software\BigBrother\bbnt\ExternalPath\")
If IsEmpty(ExtPath) Then
        ExtPath = wshShell.RegRead("HKLM\SOFTWARE\BBWin\tmppath")
End If
If Not IsEmpty (ExtPath) Then  'If not empty then we have 32bit machine
        b64Bit = False
End If
If IsEmpty(ExtPath) Then
        ExtPath = wshShell.RegRead("HKLM\SOFTWARE\Wow6432node\Quest
Software\BigBrother\bbnt\ExternalPath\")
End If
If IsEmpty(ExtPath) Then
        ExtPath =
wshShell.RegRead("HKLM\SOFTWARE\Wow6432node\BBWin\tmppath")
End If

If Not IsEmpty(ExtPath) And isEmpty(b64Bit) Then
        b64Bit = True
        err.clear
End If

If IsEmpty(ExtPath) Then
        'Put exit stuff here
End If
on Error GoTo 0
GetBigBrotherPath = ExtPath
End Function

'-----------------------------------------End
Code---------------------------------------------------------------

-----Original Message-----
From: Everett, Vernon [mailto:user-9da1a1882f49@xymon.invalid]
Sent: Thursday, 7 August 2008 3:20 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] Monitoring AD


Hi all

Anybody got anything that keeps an eye on AD?

While I am asking, what about M$-Exchange?

Cheers
    Vernon

P.S. Guess who just a bunch of Windoze servers added to Hobbit. :-(

NOTICE: This email and any attachments are confidential.
They may contain legally privileged information or copyright material. You must not read, copy, use or disclose them without authorisation. If you are not an intended recipient, please contact us at once by return email and then delete both messages and all attachments.


Important - This email and any attachments may be confidential. If received in error, please contact us and delete all copies. Before opening or using attachments check them for viruses and defects. Regardless of any loss, damage or consequence, whether caused by the negligence of the sender or not, resulting directly or indirectly from the use of any attached files our liability is limited to resupplying any affected attachments. Any representations or opinions expressed are those of the individual sender, and not necessarily those of the Department of Education and Early Childhood Development.


This message (including any attachments) contains confidential and/or proprietary information intended only for the addressee.
Any unauthorized disclosure, copying, distribution or reliance on the contents of this information is strictly prohibited and may constitute a violation of law.  If you are not the intended recipient, please notify the sender immediately by responding to this e-mail, and delete the message from your system.  If you have any questions about this e-mail please notify the sender immediately.


Important - This email and any attachments may be confidential. If received in error, please contact us and delete all copies. Before opening or using attachments check them for viruses and defects. Regardless of any loss, damage or consequence, whether caused by the negligence of the sender or not, resulting directly or indirectly from the use of any attached files our liability is limited to resupplying any affected attachments. Any representations or opinions expressed are those of the individual sender, and not necessarily those of the Department of Education and Early Childhood Development.


This message (including any attachments) contains confidential
and/or proprietary information intended only for the addressee.
Any unauthorized disclosure, copying, distribution or reliance on
the contents of this information is strictly prohibited and may
constitute a violation of law.  If you are not the intended
recipient, please notify the sender immediately by responding to
this e-mail, and delete the message from your system.  If you
have any questions about this e-mail please notify the sender
immediately.