Translations of this page:


and another set of parameters defined by the programmer called extra Instances are the elements we want to monitor. Osmius agents need to gather some information to performs these monitoring tasks.

Intance declaration

Instance declaration is how to define an instance in the configuration files.


<descriptor>: it is an alphanumeric string that identifies the instance. Its lenght can change between 3 and 16. Descriptor must be unique and can not be repeated to identify any other instance in the configuration file of the agent.


Connection_Info: is the minimum inforamtion that must be supplied to connect to the instance.

CONNECTION_INFO= <agent specific>

Connection_info may be empty when agents is monitoring local instances (same machine), or have data as username and password, when the agents need to access to provate instances, as IP address and port, when agents need to connect a network place …


It reports the insttance type that we want to monitor.

TYPE= <agent specific>

Standard parameters

Each Osmius event has several configuration parameters called standard, and another set of parameters defined by the programmer called extra. Standard parameters can be used in all Osmius events and are the following:


Syntax: -t n, where n is the number of seconds that will define the monitoring interval; every n seconds event will be called. This parameter is mandatory.


Syntax: -c 0 or -c 1; 0 means the higher value the higher instance severity and 1 means the inverse, the lower value the higher instance severity. Not mandatory.


Syntax: ”-w N”, where N is the value of warning threshold. Not mandatory.


Syntax: ”-a M”, where M is the value of alarm threshold. Not mandatory.


When we put -s silent mode is activated. If not declared the silent mode is off.
When silent mode is on, events will be sent only when a severity level change happens, if silent mode is off every event will be sent always, no exception. In order to activate it we must assign a value other than 0. The value of s indicates the number of severity changes that must ocurr to send the event.

This is specially useful as a buffer system to avoid false positives.


Syntax: -T “string”, where string can be replaced by what we want to use as custom text.Not mandatory.


 Monitoring the number of processes in an HP-UX every 5 minutes in silent mode, custom text and increasing severity:
  HPNUMPRC = -s -t 300 -c 0 -w 100 -a 300 -T "HP-UX processes from Data Center 2"

Monitoring HP-UX uptime every 5 minutes:
  HPUPTIME = -t 300 -c 1 -w 180 -a 60

Severity level

Every Osmius event is associated with one of the following severity levels:

0 – Information
1 – Warning
2 – Alarm
99 – Error


in order to compile agent you need at least the following:

  • openSSL

Not yet defined.

  • ACE

You can download it from:
Once downloaded, unzip and read the build instructions: ACE_INSTALL or ACE-INSTALL.html files
Here you can find more information about ACE:
ACE Forum:
Check the section of manual installation for further details.

  • Make Project Creator - MPC

MPC is distributed with ACE, and allow us to generate makefiles for different platforms and compilers using really simple configuration files. “Script once… and build many”.
More MPC information at:

  • Osmius Core Engine

We will need some Osmius central engine source files for compiling any agent. In particular cm and ag folders.
You can dowload the source code at:


We must download and unpack the agent, then we must define an environment variable OSM_ROOT, pointing to our Osmius base directory.
We will find a MPC file for each agent, it is called osm_ag_XXXXXXXX.mpc and it is located in each agent directory (OSM_ROOT\agents\ag_xxxxxxxxxx), review and see how easy it is. It basically contains the dependent file names for this agent. From one agent to another (if no additional libraries are required) the only change is the name of its own .h and .cpp.

To generate a Makefile for our platform and compiler is simple. It could be something like:

From the agent directory

On Linux:

$ACE_ROOT/bin/ -type make osm_ag_xxxxxxxx.mpc

From Windows console for Visual C 8:

ACE_ROOT\bin\ -type vc8 osm_ag_xxxxxxxx.mpc

For HP-UX:

$ACE_ROOT/bin/ -type gnuace osm_ag_xxxxxxxx.mpc

Now we can compile it using the resulting Makefile of MPC.

For Linux:

make -f Makefile.Osm_Ag_xxxxxxxx_Osmius

For HP-UX:

gmake -f GNU.makefile.Osm_Ag_xxxxxxxx_Osmius

For Windows:

Double click over Osm_Ag_xxxxxxxx_Osmius.vcproj and the project will be opened with Visual Studio.
In Solution configurations you must select Release.
Click on Rebuild to compile.

Starting and stopping agents

  • To run the agents you have to set the following parameters:
=> -c: path to configuration file (osm_ag_XXXXXXXX.ini). Mandatory.
=> -p: Master Agent communication port. Mandatory.
=> -m: Master Agent identifier that is associated with the agentIdentificador del Agente Maestro al que está asociado el agente, coded with 8 alphanumeric characters. Mandatory.
=> -d: Debug mode. Print more information, useful for debugging. Optional.
=> -h: Display help. Optional.

A typical example:

osm_ag_XXXXXXXX[.exe] -c osm_ag_XXXXXXXX.ini -m YYYYYYYY -p 1950 -d >> osm_ag_xxxxxxx.log

Oftenly, Osmius agents will be executed by the Master Agent, so you don't have to worry about starting, unless you want to run them in Standalone mode.

  • Stopping agents

You can stop Osmius agents as follows:

=> Ctrl + C if process is not in background
=> On Linux and similar systems: kill -SIGINT of process
=> On Windows you will have to use Task Manager to stop it.

Standalone mode

You can run Osmius agents independently, with no connection with a Master Agent. In this way you don't have to run Osmius central server or database.

Howewer, if you choose this method you won't have all the features that Osmius console offers, such as data analysis. The results of events are not stored in the Osmius central server historical database. This method can be very useful for tests.

If you want to use standalone mode you must change the agent configuration file (.ini), you must add a new value called SNDCMD in the overall agent configuration, pointing to a script, which will be executed whenever the Osmius agent retrieves an event.

SNDCMD  = C:\osmius\osmius\bin\osm_send_cmd.bat (Windows)
SNDCMD = /home/osmius/osmius/bin/ (Unix-like)

Then when you go to run the agent set to zero the Master agent port parameter (-p 0)

osm_ag_XXXXXXXX[.exe] -c osm_ag_XXXXXXXX.ini -m 00000000 -p 0 -d
en/agentes/general.txt · Last modified: 2010/12/22 13:22 (external edit)
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki