Absent Member.. Absent Member..
Absent Member..
767 views

SiteScope API method error

Jump to solution

Hi Experts,

SiteScope 11.31.491 on Windows 2008 server. I am trying to use SiteScope API methods to run some administrative tasks like running a monitor, disabling a monitor etc. But i am getting an error. Below are the errors. I am getting different errors for different methods.

Microsoft Windows [Version 6.1.7601]

E:\SiteScope\examples\integrations\api\bin>run_monitor -host <SiS_host> -port 8080 -useSSL false -login admin -password *** -monitorpath "Temporary/SNMP to BEM"
Error: Could not find or load main class SiteScopeRunExistingMonitorCommmandLine
Util

E:\SiteScope\examples\integrations\api\bin>run_monitor -host <SiS_host> -port 8080 -useSSL false -login admin -password *** -monitorpath "Temporary/SNMP to BEM"
Error: Could not find or load main class SiteScopeRunExistingMonitorCommmandLine
Util

E:\SiteScope\examples\integrations\api\bin>disable_monitor -host <SiS_host> -port 8080 -useSSL false -login admin -password *** -monitorpath "Temporary/Directory: e:\Temp on dnvbsmdp01.corp.nai.org"
log4j:WARN No appenders could be found for logger (org.apache.axis.i18n.ProjectR
esourceBundle).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more in
fo.

disabling monitor... Temporary/Directory: e:\Temp on dnvbsmdp01.corp.nai.org

Failed to run SiteScopeDisableMonitorCommandLineUtil due to com.mercury.sitescop
e.api.configuration.exception.ExternalServiceAPIException

Also get configuration and get monitoring status methods are succeeding:-

E:\SiteScope\examples\integrations\api\bin>get_sis_monitoring_status -host <SiS_host> -port 8080 -useSSL false -login admin -password ****
log4j:WARN No appenders could be found for logger (org.apache.axis.i18n.ProjectR
esourceBundle).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more in
fo.

Quering SiteScope monitoring status...
MONITORING_ACTIVE

Query success

Here are the contents of E:\SiteScope\SiteScopeAPIExamples folder:-

E:\SiteScope\SiteScopeAPIExamples\bin>cd ..

E:\SiteScope\SiteScopeAPIExamples>dir
Volume in drive E is SYSLOGS
Volume Serial Number is 8852-D6AC

Directory of E:\SiteScope\SiteScopeAPIExamples

08/10/2016 10:23 PM <DIR> .
08/10/2016 10:23 PM <DIR> ..
08/10/2016 10:23 PM <DIR> bin
08/10/2016 10:23 PM <DIR> doc
08/10/2016 10:23 PM <DIR> java
08/10/2016 10:23 PM <DIR> lib
11/30/2014 08:33 PM 745 readme.txt
08/10/2016 10:23 PM <DIR> src
1 File(s) 745 bytes
7 Dir(s) 59,261,595,648 bytes free

Please let me know the reason for the issue and the fix.

-Abhi

Labels (2)
0 Likes
1 Solution

Accepted Solutions
Micro Focus Expert
Micro Focus Expert

Hi Abhi,
after checking on my SiteScope 11.32 system, I found the same error.

run_monitor -host sov02bac13 -port 28080 -useSSL false -login xxx -password yyy -monitorpath "SGTest/Ping"
Error: Could not find or load main class SiteScopeRunExistingMonitorCommmandLineUtil

run_monitor.bat is
..
set CLASS_PATH=..\lib\api_examples.jar
call run_api_call.bat SiteScopeRunExistingMonitorCommmandLineUtil %*
..

the file
 ..\lib\api_examples.jar
refers to
 C:\SiteScope\examples\integrations\api\lib\api_examples.jar
which exists and also contains the class
 SiteScopeRunExistingMonitorCommandLineUtil

BUT, if you look very good, you will see a difference in the spelling:
 SiteScopeRunExistingMonitorCommmandLineUtil  (Commmand with 3 m)
 SiteScopeRunExistingMonitorCommandLineUtil.class (Command with 2 m)

It worked after I changed that line
 call run_api_call.bat SiteScopeRunExistingMonitorCommmandLineUtil %*
to
 call run_api_call.bat SiteScopeRunExistingMonitorCommandLineUtil %*

Greetings
Siggi

Customer Support
Micro Focus

If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.

View solution in original post

3 Replies
Micro Focus Expert
Micro Focus Expert

Hi Abhi,
after checking on my SiteScope 11.32 system, I found the same error.

run_monitor -host sov02bac13 -port 28080 -useSSL false -login xxx -password yyy -monitorpath "SGTest/Ping"
Error: Could not find or load main class SiteScopeRunExistingMonitorCommmandLineUtil

run_monitor.bat is
..
set CLASS_PATH=..\lib\api_examples.jar
call run_api_call.bat SiteScopeRunExistingMonitorCommmandLineUtil %*
..

the file
 ..\lib\api_examples.jar
refers to
 C:\SiteScope\examples\integrations\api\lib\api_examples.jar
which exists and also contains the class
 SiteScopeRunExistingMonitorCommandLineUtil

BUT, if you look very good, you will see a difference in the spelling:
 SiteScopeRunExistingMonitorCommmandLineUtil  (Commmand with 3 m)
 SiteScopeRunExistingMonitorCommandLineUtil.class (Command with 2 m)

It worked after I changed that line
 call run_api_call.bat SiteScopeRunExistingMonitorCommmandLineUtil %*
to
 call run_api_call.bat SiteScopeRunExistingMonitorCommandLineUtil %*

Greetings
Siggi

Customer Support
Micro Focus

If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.

View solution in original post

Absent Member.. Absent Member..
Absent Member..

Hey Siggi,

Thanks for pointing this out. Worked fine after correcting the spelling.

Also for the disable monitor method.. the Path to the monitor i was entering was wrong.

All good now. Thanks for your help.

-Abhi

0 Likes
Micro Focus Expert
Micro Focus Expert

Hi Abhi,

thanks for the good news.

Greetings
Siggi

Customer Support
Micro Focus

If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
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.