Absent Member.. mig0913 Absent Member..
Absent Member..
2184 views

SiteScope API runExisitingMonitorEx - runExisitingMonitorExWithIdentifie

I've attached a disk space error snmp trap that is sent from SiteScope 11.0 , I'm currently writing a script using the Sitescope API this script is used by our NOC analyst to run a monitor when a error occurs. However I need the path to the monitor but in the snmp trap there is no indication of where the path is at other then TEST.1 . Which API tool would I use to use TEST.1 as my path . Does anyone have any examples ?

 

Thanks you

Labels (1)
0 Likes
3 Replies
parkar Acclaimed Contributor.
Acclaimed Contributor.

Re: SiteScope API runExisitingMonitorEx - runExisitingMonitorExWithIdentifie

I am not sure but below may help you

 

The only way to manage SiteScope - if not using the GUI - is via the SOAP API, which is a web-based API (requests are sent via HTTP).
 
The .zip file "SiS_API_Client_10.11.zip" contains a Java based client to invoke those SOAP-API calls, to show how u can developown applications to interface with the External API.

An example of each SiteScope API call that can be run from a command line on a Windows or UNIX platform is provided:
-e.g, run a monitor (run_monitor.bat)

-- get the configuration via a template (get_configuration_via_template.bat)
- get the full configuration (get_full_configuration.bat)

Requirements
1. Install JRE 1.6 on the client machine

2. Create a folder named "SiteScopeAPIExamples"

3. Extract the contents of the file attached to "SiteScopeAPIExamples"
     Contents of the \SiteScopeAPIExamples folder:
      bin - example scripts
      doc - API JavaDoc 
      lib - jars
      src - API example source code

4. Copy the JRE folder to "SiteScopeAPIExamples".

5. In the "SiteScopeAPIExamples" folder, rename the JRE folder to "java".

How to run
 1. Go to the \bin folder.
 2. Run the .sh (UNIX) or .bat (Windows) file.

Customers can write their client in any language, not necessarily in Java.

 
- the file attached contains the SiteScope API client for SiteScope 10.11
- starting with SiteScope 11.0 this API will be fully supported


Examples:
cd \SiteScopeAPIExample\bin

get_full_configuration -host vm17015.deu.hp.com -port 18080 -useSSL false -login admin -password admin

Note:
-host     = host SiteScope runs on
-port     = port SiteScope interface runs on (default 8080)
-login    = SiteScope username
-password = SiteScope password for this user

The messages
 log4j:WARN No appenders could be found for logger (org.apache.axis.i18n.ProjectResourceBundle).
 log4j:WARN Please initialize the log4j system properly.
can be ignored

get full configuration and list it on the screen
get_full_configuration -host vm17015.deu.hp.com -port 18080 -useSSL false -login admin -password admin

-----------------------------------------------------
Monitor name : SiteScopeRoot/vm17015_SiteScope_Group1/CPU vm17001
-----------------------------------------------------
Monitor properties:
_internalId = 200475886
_name = CPU vm17001
_remoteID = RemoteNTInstancePreferences_11
_updateMonitorAndRun = true
_categoryByAvailability = none
_id = 9
_baseliningTolerance = BASELINE_TOLERANCE_MEDIUM
_enabled = true
_statusOnInternalError = thresholds
_thresholdNew = true
_rawDataOn = false
_baseliningActivation = true
_dependsCondition = good
_frequency = 120
_machine = \\vm17001.deu.hp.com
_class = CPUMonitor
_reportTopology = true
_baselineUser = admin
_rawDataAvailable = false
_rawDataLimit = 1048576
_baseliningStatus = CALCULATED_NOT_ACTIVATED
_previousName = CPU vm17015(1)
objcategory =
_classifier = [utilizationPercentage == 'n/a' error, utilizationPercentage == 100 error, utilizationPercentage >= 7.04 error, utilizationPercentage >= 6.08 warning]
_encoding = Cp1252
_defaultStatus = good
..
..

Cheers!

Nvr Blame a day in ur life....... Good day gives "happiness" & Bad day gives "experience" ......
0 Likes
parkar Acclaimed Contributor.
Acclaimed Contributor.

Re: SiteScope API runExisitingMonitorEx - runExisitingMonitorExWithIdentifie

 
Cheers!

Nvr Blame a day in ur life....... Good day gives "happiness" & Bad day gives "experience" ......
0 Likes
Absent Member.. mig0913 Absent Member..
Absent Member..

Re: SiteScope API runExisitingMonitorEx - runExisitingMonitorExWithIdentifie

Thanks for the response  ...  I've already tried that approach I modified SiteScopeRunExistingMonitorCommmandLineUtil.java in /src to print out the hash reponse from running monitor. However, in the snmp trap that is sent to our server there isn't a full path to the monitor. In our production Sitescope the path to the Monitors are complex

for example :

 

Server Availbilty/NT Servers/Database Servers/db20001/db20001: CPU utilization

 

When you run run_monitor with that path it doesn't like the spaces. Also the SNMP trap doesn't send a full path to this monitor gives group name and monitor id . I wrote a tool a long time ago that used /cgi/go.exe and gave the group and id in a URL call and it would refresh the monitor fine , However, in the new version I'm having a ton of troubles writing a tool to run a monitor because of the problems described.

 

 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.