Home > Domino Tips > Developer > Agent > Monitoring scheduled agents by email
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

AGENT

Monitoring scheduled agents by email


Andrew Broxholme
01.03.2006
Rating: -3.46- (out of 5)


Lotus Notes and Domino tips, tutorials and how-to articles
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


In one of our larger applications, there are a number of critical scheduled agents that update data in the application from a back-end relational database. If the connection is lost, or the Lotus Notes database is down, the agents don't run to completion. Agent logs report all activity, but you have to open the logs to check for problems.

Recently the data server failed for an extended period and the logs weren't checked. This led to no updates for 48 hours, until the users noticed and reported the problem to our help desk.

It wasn't a problem to fix the connection and get everything running. But the situation prompted me to write some basic code to e-mail me if the Notes/Domino agents I was most interested in had not run for more than 12 hours.

Monitoring scheduled agents by e-mail involves a procedure that you insert at the end of each agent you want to monitor. This updates a keyword document in the application. You then add another scheduled agent, which runs every 12 hours/every day ,and checks when the agents last ran. If the agents haven't run, then an e-mail is sent to the administrator advising them to check the application and activity logs to see what is going on.

I have included the code for the subroutine which used the existing application keyword form, and a simple agent to check that at least one of the agents have run in the last 12 hours.

MEMBER FEEDBACK TO THIS TIP

If the agent is in the database, what would monitor whether this agent is running or not? I "tweaked" it a little to remove the keywords, run against all enabled scheduled agents, and e-mail a list of the agents that were not running. Now I can use the same agent in my databases. Here is my new code:

—Pat C.

******************************************

It's an interesting idea to have an agent check if they are enabled or have been turned off using agent properties, which might occur if the application design was updated fr


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


RELATED CONTENT
Agent
Run or restart Notes/Domino agents via text messages
Approve Lotus Notes documents using a BlackBerry mobile device
LotusScript agent indexes Lotus Notes/Domino databases
Open documents in Lotus Notes from the Web without a UNID
Fix and update Lotus Notes documents with limited access
Verify scheduled agent status with Domino Extensible Language (DXL)
How to export data from a Lotus Notes database to a CSV file
Enable or disable scheduled agents without opening the Lotus Notes database design
Creating custom views in Lotus Notes databases
Editing fields in a Lotus Notes view with Ajax

Lotus Notes Domino Coding and Development
Tutorial: 30 LotusScript tips
A bevy of Notes/Domino development tips
A Formula language for Lotus Notes introduction -- 7 tips in 7 minutes
Top 10 Notes/Domino developer tips of 2006
Sending and logging faxes from Lotus Notes and Domino
Accessing documents in a Lotus Notes database
A smorgasbord of Notes/Domino development tips
Creating a Lotus Notes view column categorized by month
A project-tracking application for Lotus Notes Domino
What the new Office means for developers

Lotus Notes Domino Agents
Run or restart Notes/Domino agents via text messages
Calculating results for a column in a Lotus Notes view
Approve Lotus Notes documents using a BlackBerry mobile device
LotusScript agent indexes Lotus Notes/Domino databases
Top 10 Lotus Notes/Domino coding and development tips of 2008
Open documents in Lotus Notes from the Web without a UNID
Fix and update Lotus Notes documents with limited access
Verify scheduled agent status with Domino Extensible Language (DXL)
Top 10 Lotus Notes Domino programming and development tips of 2007
How to export data from a Lotus Notes database to a CSV file

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


om a template with agents turned off. However, it doesn't solve the problem that I designed the process for, because it won't tell you when an agent failed to run to completion because of a run-time processing error. This is why the code that updated the keyword is being placed in the very last lines of the script.
—Andrew Broxholme, tip author

******************************************

Just a thought about this tip: What if there is a problem running scheduled agents on the server? It could be a problem on the server, changes in access rights for the agent signer, or any number of things. If the agent doesn't run then there is no mail.
—Erik R.

******************************************

It could be a problem where agents are not running at all, but system administrators should detect this. This process is designed to monitor a single application, which has core processes that need to run to maintain the application's integrity. If you need to monitor an entire server, you could have servers monitor one another.
— Andrew Broxholme, tip author

******************************************

We have designed a fairly extensive system of error reporting that is fed by all Lotus Notes Domino agents -- whether they are scheduled or triggered. The agents create a custom "log" document and start with a "failed" state. If they run successfully, they change the status to "Success," and the Lotus Notes document gets deleted. But if there is any error with the execution (system error, data error, rights problem, etc.), then it is reported on this log document, along with detailed information (error #, line #, user, server stats, etc.). This method has worked quite well.

— Nadeem M.

Do you have comments on this tip? Let us know.

This tip was submitted to the SearchDomino.com tip library by member Andrew Broxholme. Please let others know how useful it is via the rating scale below. Do you have a useful Lotus Notes, Domino, Workplace or WebSphere tip or code snippet to share? Submit it to our monthly tip contest and you could win a prize.

Rate this Tip
To rate tips, you must be a member of SearchDomino.com.
Register now to start rating these tips. Log in if you are already a member.




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Domino & Lotus Notes Security Solutions: Authentication, Antispam, Encryption and Antivirus
HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts