LoriotPro Forum
18 July 2012 à 04:42:34 *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Test de newsletter
   Home   Help Search Login Register  
Pages: [1]
Author Topic: Active view and processsuveyor  (Read 1733 times)
Posts: 6

View Profile
« on: 29 April 2009 à 23:55:54 »

I have made an active view of a host that has 3 services running, and they are monitored with processsurveyor ( service changes to running = 2, service changes to not running = 4 ) I inserted them into the active view map with the Insert Child objects option.

Dynamic polling interval is 15 seconds, when I stop the services they go red for 15 sec then they go back to green even though the services has not been restarted.

What do i need to change so they stay red while the service is stopped?
Luteus Support
Modérateur Global
Posts: 10

View Profile WWW
« Reply #1 on: 30 April 2009 à 09:43:17 »


We are a little bit confuse with you description because the Process surveyor monitor processes and not services.

Its goal is to generate event when a process is missing (windows) our reach a specific state (Linuw x/unix)

If you copy the plugin in an active view you get the status of the plugin and not the status of the process that you monitor.

To get the status of the process in the active view you should monitor the counter of the event that are generated when the process state change.

You can read the following documentation example made with a trap but it is roughly the same principle.
The object in the active should read the event counter and on the retrun value you can change the color of the icon.

Another solution is to use the LUA scripting if you use an Extended Edition.
In that case you donít need the Process surveyor plugin because you directly monitor the process from The active view object.

Read the following documentation to know how to launch a script from an active view object


The full scripting documentation


Here is an example of script that monitor process. It can be necessary to adapt it to your exact requirement.

-- Loriotpro V4
-- To run correctly this file is located to bin/config/script
-- Input values
-- lp_index index for this script ".1"
-- lp_oid SNMP OID for this script "ifnumber"
-- lp_host default ip address for this script ""
-- Output Values
   lp_value = 0;
   lp_buffer ="error";
-- dofile(lp.GetPath().."/config/script/loriotinit.lua");
ProcessList = {};
ProcessStatus = {}
ProcessList[1] = "snmp.exe"; ProcessStatus[1] = "stopped";
ProcessList[1] = "notepad.exe"; ProcessStatus[1] = "stopped";

--MibFileExist = lp.IsLoadedMIBRef("HOST-RESOURCE-MIB");

if  MibFileExist ~= nil then
lp.Trace("Host Resource MIB File not compiled\n");

lp_value = lp.GetRows(lp_host,"hrswrunname.0,hrswrunstatus","myArray");
if lp_value ~= nil then
lp.Trace(("return "..lp_value.." lines\n"));

for i=0 , (lp_value-1) do
      lp.Trace("line "..i.." with index "..myArray["I-"..i].."-");
       if (myArray["hrswrunname-"..i] ==  ProcessList[1]) then
            if(myArray["hrswrunstatus-"..i] ~= "running") then
                  ProcessStatus[1] = "stopped";                 
                  ProcessStatus[1] = "running";   


--ENvoie une alarme si un process de la list est manquant et not running
tblsize = table.getn(ProcessStatus);
for i=1 , tblsize do
            if ProcessStatus == "stopped" then
            alarm=string.format("WARNING Host : "..lp_host.." - Process : ".. ProcessList.." not running");
            evntnumber = 92000 + i;
                 lp.SendEvent( evntnumber,2,lp_host,"",alarm);


In the active view rule you can check the return value and change the color according to it.
Pages: [1]
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!