This resource model monitors the output of the command SNMPCheck_sh
Internal Name | IBMDirector_SNMPCheck |
Descriptive Name | SNMPCheck_sh Monitor |
Platforms | w32-ix86 |
Category | WizGenRM |
Category Description | Wizard Generated Resource Models |
Cycle Time | 300 |
Version | 1.0 |
Internal Name | Ev_SNMPCheck_sh_ScriptResult_matches | ||||||||||
Descriptive Name | SNMP Service | ||||||||||
Description | This event is sent when the SNMP service goes down. | ||||||||||
Message | The IBM Director SNMP Service is Down. | ||||||||||
Numeric Attributes | |||||||||||
String Attributes |
| ||||||||||
Keys | |||||||||||
Occurrences | 1 | ||||||||||
Holes | 0 | ||||||||||
Clearing Event | TRUE | ||||||||||
Send to TEC | TRUE | ||||||||||
Send to TBSM | FALSE | ||||||||||
Severity | CRITICAL | ||||||||||
|
Internal Name | Descriptive Name | Description | Default Value |
---|
Internal Name | Descriptive Name | Description | Type | Values |
---|---|---|---|---|
Par_ScriptResult_eqs | ScriptResult matching values | When the property ScriptResult is equal to one of the values of this parameter the event Ev_SNMPCheck_sh_ScriptResult_matches is generated | STRING LIST |
|
Context | Resource | Keys | Numeric Attributes | String Attributes |
---|
//'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' // IBM Tivoli Monitoring // Decision Tree script // // This file has been generated by IBM Tivoli Monitoring Workbench // // 02/27/2003 17:07:58 //''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' var hTableScriptResult; var flagNotFirstRun = 0; // This function is used to define the settings of the resource model // It is called only once, when the resource model is started. // Don't modify remarks containing tags like <<....>> ... <<\...>> // You can write additional initializing code in this function if required. function SetDefaultConfiguration (Svc) { // General info section //<<GENERAL_INFO>> Svc.SetModelName ("IBMDirector_SNMPCheck"); Svc.SetProfileName ("63982578"); Svc.SetCycleTime (300); //<<\GENERAL_INFO>> // Thresholds section //<<THRESHOLDS_INFO>> //<<\THRESHOLDS_INFO>> // Parameters section //<<PARAMETERS_INFO>> Svc.DefineStrParameter ("Par_ScriptResult_eqs", "down"); //<<\PARAMETERS_INFO>> // Dynamic model section //<<DATA_INFO>> //<<\DATA_INFO>> // Event definition section //<<EVENTS_INFO>> Svc.DefineEvent ("Ev_SNMPCheck_sh_ScriptResult_matches", "", "prev_value,value,relation_delta,ScriptResult"); //<<\EVENTS_INFO>> // Logging definition section //<<LOGGING_INFO>> //<<\LOGGING_INFO>> // Place your additional intializing code below return (0); } // This function is called by the DM For Windows Analyzer after that // the resource model default settings have been overridden // It is called only once, when the resource model is started. // You can write additional initializing code in this function if required // to use the thresholds and parameters values function Init(Svc) { hTableScriptResult = Svc.CreateMap(); return (0); } // This function contains the monitoring algorithm // It is called ciclically after a cycle time has elapsed // Implement the the monitoring code here function VisitTree(Svc) { var curScriptResult; var hashKey; var found; var OldScriptResult; var hPropTable; var ProbeArgCount; var ProbeArgIdx; var ParamCount; var ParamIdx; var Different; hPropTable = Svc.CreateMap(); //Implementation for the monitor ScriptResult Svc.RemoveMapAll(hPropTable); hashKey = "ScriptResult"; curScriptResult = Svc.Shell ("SNMPCheck.sh"); Svc.SetMapStrElement(hPropTable,"ScriptResult",curScriptResult); found = Svc.ExistsMapElement(hTableScriptResult, hashKey); if (found) OldScriptResult = Svc.GetMapStrValue(hTableScriptResult, hashKey); else OldScriptResult = ""; Svc.SetMapStrElement(hPropTable,"OldScriptResult",OldScriptResult); Svc.SetMapStrElement(hPropTable,"prev_value", OldScriptResult); Svc.SetMapStrElement(hPropTable,"value", curScriptResult); Svc.SetMapStrElement(hPropTable,"relation_delta",""); ParamCount = Svc.GetStrParameterCount("Par_ScriptResult_eqs"); for (ParamIdx = 0; ParamIdx < ParamCount; ParamIdx++) { if ((curScriptResult.toLowerCase() + "") == (Svc.GetStrParameter("Par_ScriptResult_eqs", ParamIdx).toLowerCase())) { Svc.SendEventEx ("Ev_SNMPCheck_sh_ScriptResult_matches",hPropTable); } } Svc.SetMapStrElement(hTableScriptResult, hashKey, curScriptResult); Svc.DestroyMap(hPropTable); return (0); } |
All |
|
w32-ix86 |
This Html document has been generated by IBM Tivoli Monitoring Workbench