How to control where agents run in clustered environment

At IBM Connect in January during “Ask the Product Managers” sombody asked how he could control where an agent ran in a clustered environment.

In agent settings you can specify which server the agent runs on, but if server is down ? What to do.

I have made a database that can control this.

Here is how it works.

Put the database on the server, and create a document for each agent you want to control.
in here you set the agent, and which server you would like it to run on.

The external database lookup is used to find the agent controler database in lib.dmc.agent. Feel free to change it to how you want to connect to the database.

Then simply set the agent properties so that the agents run on all servers, and make sure that the following code is in your agent:

Use “lib.dmc.agent”

Dim session As New NotesSession
Dim agent As NotesAgent
Set agent = session.Currentagent
If determineRunServer(agent.Name, session.Currentdatabase.Server) Then
‘Start running agent – write en agentlog or other to specify where you run, or whatever you like
‘Exit agent
Exit Sub
End If

The when the agent runs, it will ask the agent controler database if it should run or not.

There is also a function to change the “run” server for all the agents that run on one server.

Its not a 100 % finished, but it works, and i hope somebode can gat some use of it.


Everebody feel free to download ! And contact me in case of questions.



This entry was posted in Uncategorized. Bookmark the permalink.