|
In This Issue
·
Programmatically Enable or Disable Items
·
New
stuff at TNT Software
·
Summer
Reading List
·
NOT
Strictly Business
TNTSoftware.com
FREE - Try
us for 30 days
Compare
Products
Sarbanes
Oxley Information
Security
What's
New?
Government
pages
Testimonials
"I
don't see how anyone can run Windows machines without ELM. It's like watching
TV without TIVO."
Case
Studies
See how companies worldwide are using ELM to
proactively manage their environments
2001
Main Street
Vancouver, Washington 98660
Phone:
360.546.0878
Fax:
360.546.5017
Toll-Free:
877.546.0878
http://www.tntsoftware.com/
Email
TNT Software
|
Programmatically Enable or Disable Items
When monitoring Agents, you may find it useful to automatically enable or
disable an item when a dependency item fails. For example, say you were
monitoring a server on the other side of a router, and the router itself. If
the router goes down, it will appear to the ELM Server as if the monitored
systems on the other side of that router are also down. In this case, you can
cause the router down events/alerts to trigger the programmatic disabling of
items whose monitoring depends on the router being up.
The programmatic enabling and disabling of items is
accomplished by using a Command Script Notification Method that executes a
VBScript.
» To Programmatically Enable or Disable an Agent from a Command Script
Notification Method:
1. Locate the Agent's Index No. (GUID) and copy it to the
Windows clipboard. (Export the Agent object to the Windows clipboard by
right-clicking on the Agent and selecting Export To | Clipboard | Plain Text.
Open Notepad and paste the contents from the clipboard. This number is a long
GUID surrounded by {}.)
2. Create a new Command Script Notification Method which
will be used to enable or disable the item. (You will find the script to enable
an Agent already in the Command Script Notification Method as an example. You
need only add the Agent GUID and decide to enable or disable.)
a. In the Script Name field, name the script Enable.vbs.
b. Set the type to cscript.exe
c. Copy and paste the following into the Script field:
Call Enable_Agent_Object("","<_Item>",True)
Sub Enable_Agent_Object(ByRef SessionPasswordString, _
ByRef ObjectIndexString, ByVal bEnableObject)
On Error Resume Next ' Defer error trapping.
Dim SessionObject
Set SessionObject = CreateObject("EEMSVR.TNTEnterpriseSession")
Call SessionObject.Connect(SessionPasswordString)
Dim ItemObject
Set ItemObject = SessionObject.AgentCollection.Find(ObjectIndexString)
Dim LockItemObject
Set LockItemObject = CreateObject("TNTWZ.TNTItemWriteLockHelper")
Dim ItemCopyObject
Set ItemCopyObject = LockItemObject.LockedItemCopy(ItemObject)
ItemCopyObject.Enabled = bEnableObject
Call LockItemObject.UpdateOriginalItem
End Sub
|
d. In the above script, change <_Item> to the Index No. for
the Agent. The above script is used to enable items. To disable items, change
the word True to False.
e. Click Next to continue. Select the Rule that will be used
to execute this Notification Method when an event or Alert indicating the
router is down is received by the ELM Server. Note: You mmust create a Rule
that will be used to execute this Notification Method when an event or Alert
indicating the router is down is received by the ELM Server. You may need to
create an Event Filter to isolate the specific router down event.
f. Enter the Threshold settings. Select "Activate this
notification method after it is triggered 1 times within 1 seconds".
g. Create a schedule for when this Notification Method is to
be active.
h. Give it a name of Enable OBJECT or Disable OBJECT where
OBJECT is the name of the object you want to enable/disable. Click Finish to
save the Notification Method.
You can programmatically enable and disable other items, as
well. Below are scripts that can be used to enable/disable Monitor Items, Rules
and Notification Methods:
************Monitor Items*************
Call Enable_Monitor_Object("","<_Item>",True)
Sub Enable_Monitor_Object(ByRef SessionPasswordString, _
ByRef ObjectIndexString, ByVal bEnableObject)
On Error Resume Next ' Defer error trapping.
Dim SessionObject
Set SessionObject = CreateObject("EEMSVR.TNTEnterpriseSession")
Call SessionObject.Connect(SessionPasswordString)
Dim ItemObject
Set ItemObject = SessionObject.MonitorCollection.Find(ObjectIndexString)
Dim LockItemObject
Set LockItemObject = CreateObject("TNTWZ.TNTItemWriteLockHelper")
Dim ItemCopyObject
Set ItemCopyObject = LockItemObject.LockedItemCopy(ItemObject)
ItemCopyObject.Enabled = bEnableObject
Call LockItemObject.UpdateOriginalItem
End Sub
|
>>>>>The above script is used to enable
items. To disable items, change the word True to False.
****************Rules*******************
Call Enable_Notification_Rule_Object("","<_Item>",True)
Sub Enable_Notification_Rule_Object(ByRef SessionPasswordString, _
ByRef ObjectIndexString, ByVal bEnableObject)
On Error Resume Next ' Defer error trapping.
Dim SessionObject
Set SessionObject = CreateObject("EEMSVR.TNTEnterpriseSession")
Call SessionObject.Connect(SessionPasswordString)
Dim ItemObject
Set ItemObject = SessionObject.NotificationRuleCollection.Find(ObjectIndexString)
Dim LockItemObject
Set LockItemObject = CreateObject("TNTWZ.TNTItemWriteLockHelper")
Dim ItemCopyObject
Set ItemCopyObject = LockItemObject.LockedItemCopy(ItemObject)
ItemCopyObject.Enabled = bEnableObject
Call LockItemObject.UpdateOriginalItem
End Sub
|
>>>>>The above script is used to enable
items. To disable items, change the word True to False.
*********************Notification
Methods**********************
Call Enable_Notification_Object("","<_Item>",True)
Sub Enable_Notification_Object(ByRef SessionPasswordString, _
ByRef ObjectIndexString, ByVal bEnableObject)
On Error Resume Next ' Defer error trapping.
Dim SessionObject
Set SessionObject = CreateObject("EEMSVR.TNTEnterpriseSession")
Call SessionObject.Connect(SessionPasswordString)
Dim ItemObject
Set ItemObject = SessionObject.NotificationCollection.Find(ObjectIndexString)
Dim LockItemObject
Set LockItemObject = CreateObject("TNTWZ.TNTItemWriteLockHelper")
Dim ItemCopyObject
Set ItemCopyObject = LockItemObject.LockedItemCopy(ItemObject)
ItemCopyObject.Enabled = bEnableObject
Call LockItemObject.UpdateOriginalItem
End Sub
|
>>>>>The above script is used to enable
items. To disable items, change the word True to False.
New Stuff at TNT
Software
-
ELM Maintenance Release 4.0.221 is now available for download
here.
-
New User and Administrator PDFs Available
With the release of ELM Maintenance Release 4.0.221 are significantly updated
User and Administrator Guides. Those updates have been incorporated into the
PDF version of ELM Guides, now available online. Call or email your TNT
Software Representative to receive directions for downloading these files.
-
Mark your calendars... Save the last week of September for us! We're planning a
Users Group Meeting where our experts will be happy to meet you and talk about
ELM (hint: What comes after 4.0?)
Summer Reading List
Putting a Summer reading list together? Looking for that
perfect book for lazy days in the hammock, iced-tea in hand? Here are the top
ten best selling Systems Administrator books at Amazon.com:
-
Microsoft Windows Command-Line Administrator's Pocket Consultant (Pro -
Administrator's PC)
by William R. Stanek (Paperback - April 28, 2004)
-
Time Management for System Administrators
by Thomas Limoncelli (Paperback - November 22, 2005)
-
Microsoft Windows Server 2003 Administrator's Pocket Consultant
by William R. Stanek (Paperback - March 12, 2003)
-
Product Development for the Lean Enterprise: Why Toyota's System Is Four Times
More Productive and How You Can Implement It
by Michael N. Kennedy (Hardcover - April 2003)
-
Secret Service: Hidden Systems That Deliver Unforgettable Customer Service
by John R. DiJulius III (Paperback - January 2003)
-
Microsoft Exchange Server 2003 Administrator's Pocket Consultant
by William R. Stanek (Paperback - August 13, 2003)
-
Microsoft Systems Management Server 2003 Administrator's Companion
by Steven D. Kaczmarek (Paperback - February 2004)
-
Microsoft IIS 6.0 Administrator's Pocket Consultant
by William R. Stanek (Paperback - April 2, 2003)
-
MCSA/MCSE/MCDBA Self-Paced Training Kit: Microsoft SQL Server 2000 System
Administration, 70-228, Second Edition
by Microsoft Corporation, Microsoft Corporation (Hardcover - May 14, 2003)
-
Data Modeling Essentials, Third Edition (Morgan Kaufmann Series in Data
Management Systems) (The Morgan Kaufmann Series in Data Management Systems)
by Graeme Simsion, Graham Witt (Paperback - November 4, 2004)
NOT Strictly Business
From last month's newsletter... David T from North Carolina
sent
this link as another explanation of the origin of the word "golf". -
Thanks, David!
Mother's Day (May 14 in U.S.A.) Fun Facts - Did You Know...
~From a survey sponsored by salary.com: It was determined that 2006
stay-at-home moms work over 91 hours per week and, if paid a fair salary, would
be paid $134,000 per year
~In the United States, there are about 82.5 million mothers. (And all of them
wish their kids would call more often)
~Mother's Day is widely reported as the peak day of the year for long distance
telephone calls.
~There are more than 23,000 florists in the United States with a total of more
than 125,000 employees. Colombia is the leading foreign supplier of cut flowers
and fresh flower buds to the US. California produces two-thirds of domestic
production of cut flowers. (If you can't call, send flowers. Or better - do
both)
~Mother's Day is the busiest day of the year for many restaurants.
~Retailers report that Mother's Day is the second highest gift-giving holiday
in the United States - Christmas is the highest.
~The most popular month for having babies in the US is August, and most popular
weekday is Tuesday.
~In the US, 82% of women ages 40-44 are mothers. This compares to 90% in 1976.
~In Utah and Alaska, women on the average will have three children before the
end of their childbearing years. Overall, the average in the United States is
two.
~In 2002, 55% of American women with infant children were in the workforce,
compared to 31% in 1976, and down from 59% in 1998. In 2002, there were 5.4
million stay-at-home mothers in the US.
These stats were found at
About.com, where you'll find more interesting information about
Mother's Days throughout history.
May 9th in History
1386 - England and Portugal signed the Treaty of Windsor, pledging permanent
alliance and friendship.
1502 - Christopher Columbus set out from Cadiz, Spain, on his fourth and last
voyage.
1671 - Thomas Blood, Irish adventurer better known as Captain Blood, stole the
crown jewels from the Tower of London.
1785 - British inventor Joseph Bramah patented the beer-pump handle.
1901 - Australia opened its first parliament in Melbourne.
1926 - Americans Richard E. Byrd and Floyd Bennett became the first to fly over
the North Pole.
1945 - The ban on horse racing and the nationwide midnight curfew in the United
States during World War II were immediately lifted, as the Germans had
surrendered the previous day.
1950 - French Foreign Minister Robert Schuman proposed the creation of a
supranational European federation to strengthen the European economies. "The
Schuman Declaration," as it became known, would eventually lead to the creation
of the European Economic Community, now the European Union.
Born on May 9th:
1800 John Brown abolitionist d: 1859
1860 Sir James Barrie author, dramatist d: 1937
1882 Henry J. [John] Kaiser industrialist d: 1967
1918 Mike [Myron Leon] Wallace reporter, interviewer
1946 Candice Patricia Bergen Emmy Award-winning actress
|