HP SiteScope - Any way to poll information from SiteScope using an API (435 Views)
Reply
Valued Contributor
RYU123
Posts: 346
Registered: ‎10-09-2012
Message 1 of 17 (435 Views)
Accepted Solution

HP SiteScope - Any way to poll information from SiteScope using an API

Dear Experts,

We are currently using SiteScope 11.22 installed on RHEL.

I was wondering if it is possible to poll for information using the SiteScope API?

Or what is the preferred method to poll for information from SiteScope?

Basically we have a customer that wants to poll information from SiteScope, like if the monitors are in error etc, so that they can integrate that information to their own dashboard.

 

Any advice on this is very much appreciated.

Thanks,

Please use plain text.
HP Expert
Gunnar_L
Posts: 303
Registered: ‎05-22-2012
Message 2 of 17 (431 Views)

Re: HP SiteScope - Any way to poll information from SiteScope using an API

Hi,

 

There are some methods you can use via API, in the attach document you can find information about  those methods starting at page 43.

 

Best Regards,

Gunnar López
HP Support
If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
Please use plain text.
Valued Contributor
RYU123
Posts: 346
Registered: ‎10-09-2012
Message 3 of 17 (424 Views)

Re: HP SiteScope - Any way to poll information from SiteScope using an API

Thanks Gunnar,
I found the data_acquisition API but was wondering if you know the syntax as I am having trouble with the syntax, especially what is the syntax for "starttime" and "endtime"
Please use plain text.
HP Expert
Gunnar_L
Posts: 303
Registered: ‎05-22-2012
Message 4 of 17 (410 Views)

Re: HP SiteScope - Any way to poll information from SiteScope using an API

Hi,

 

For example for the get_full_configuration you have to use a syntax like this one:

 

C:\SiteScope\examples\integrations\api\bin>get_full_configuration.bat -host <ip> -port 8080 -useSSL false -login <user> -password <psswd>  > c:\config.txt

 

That will send all the information to a file call config.txt located on C:\

 

I'm doing some test for the  data_acquisition method, but you can give it a try to the other method while I'm finish my test.

 

Best Regards,

Gunnar López
HP Support
If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
Please use plain text.
HP Expert
kenneth.gonzalez
Posts: 1,514
Registered: ‎04-28-2011
Message 5 of 17 (403 Views)

Re: HP SiteScope - Any way to poll information from SiteScope using an API

Hi,

Start and end times should be sent in UNIX format. Refer to the javadoc for all API methods in SiteScope\examples\integrations\api\doc\javadoc.zip
Kenneth Gonzalez
HP Support

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

If you haven’t tried it yet, come and join us in our entitled forums at Support Customer Forums
Please use plain text.
HP Expert
Gunnar_L
Posts: 303
Registered: ‎05-22-2012
Message 6 of 17 (397 Views)

Re: HP SiteScope - Any way to poll information from SiteScope using an API

This is an example of syntax for that method: C:\SiteScope\examples\integrations\api\bin>data_acquisition.bat -host <IP> -port 8080 -useSSL false -login <user> -password <psswd> startTime 1391299200  -endTime 1391990400 -strFilePath c:\test.txt 

 

You can use this page: http://www.onlineconversion.com/unix_time.htm to convert from date/time to Unix timestamp.

 

Best Regards,

Gunnar López
HP Support
If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
Please use plain text.
Valued Contributor
RYU123
Posts: 346
Registered: ‎10-09-2012
Message 7 of 17 (388 Views)

Re: HP SiteScope - Any way to poll information from SiteScope using an API

Thanks Gunnar for the example.

After running the command, i get...

 

 

log4j:WARN No appenders could be found for logger (org.apache.axis.i18n.ProjectResourceBundle).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

 

Data Acquisition according to given query criterions...

Action was successfully completed

 

 

Then I go to look to see what is populated in the text file...

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<performanceMonitors collector="SiteScope" collectorHost="mdc2vr4132.federated.fds">
<topology>
<cis/>
<links/>
</topology>
</performanceMonitors>

 

It does not show any history

 

Can you please tell me what I may be doing wrong?Or if i forgot anything?

Please use plain text.
HP Expert
Gunnar_L
Posts: 303
Registered: ‎05-22-2012
Message 8 of 17 (373 Views)

Re: HP SiteScope - Any way to poll information from SiteScope using an API

I'm having same behavior here.

 

I will check this with our development department.

 

Best Regards,

Gunnar López
HP Support
If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
Please use plain text.
Valued Contributor
RYU123
Posts: 346
Registered: ‎10-09-2012
Message 9 of 17 (366 Views)

Re: HP SiteScope - Any way to poll information from SiteScope using an API

Gunnar,

is there a way to pull the information as shown in the screenshot as one of my customers would like to integrate this information with their dashboard.

 

1.JPG

Please use plain text.
HP Expert
Gunnar_L
Posts: 303
Registered: ‎05-22-2012
Message 10 of 17 (361 Views)

Re: HP SiteScope - Any way to poll information from SiteScope using an API

I think that depends more on the third party tool you are using, for example if you integrate SiS with BSM you can see the monitors on red or green depends of the status of the monitor, that is because SiS send the status and BSM populate the dashboard.

 

Best Regards,

Gunnar López
HP Support
If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
Please use plain text.
Valued Contributor
RYU123
Posts: 346
Registered: ‎10-09-2012
Message 11 of 17 (354 Views)

Re: HP SiteScope - Any way to poll information from SiteScope using an API

Ok thanks Gunnar,

Then I guess send the most recent data or information to their server

Please use plain text.
HP Expert
Gunnar_L
Posts: 303
Registered: ‎05-22-2012
Message 12 of 17 (334 Views)

Re: HP SiteScope - Any way to poll information from SiteScope using an API

You are welcome.

 

I talked with our R&D team, we were able to make this work.

 

Please do this:

 

Go to SiteScope\groups edit the master.config file, look for _logReaderPoolTimeout and change it to 20000, then save the file and restart SiS service.

 

 

Then use the same syntax I sent to you, but use the dates on milliseconds.

 

You can use this page to make the conversion.

 

http://www.timestampconvert.com/

 

Best Regards,

Gunnar López
HP Support
If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
Please use plain text.
Valued Contributor
RYU123
Posts: 346
Registered: ‎10-09-2012
Message 13 of 17 (328 Views)

Re: HP SiteScope - Any way to poll information from SiteScope using an API

I tried making the changes and i still get the same outcome...did it work for you?
Please use plain text.
HP Expert
Gunnar_L
Posts: 303
Registered: ‎05-22-2012
Message 14 of 17 (325 Views)

Re: HP SiteScope - Any way to poll information from SiteScope using an API

Yes, this is working for me after the changes, are you using 13 digits date?

 

Best Regards,

Gunnar López
HP Support
If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
Please use plain text.
Valued Contributor
RYU123
Posts: 346
Registered: ‎10-09-2012
Message 15 of 17 (321 Views)

Re: HP SiteScope - Any way to poll information from SiteScope using an API

13 digits??? I only count 10 digits

Please use plain text.
HP Expert
Gunnar_L
Posts: 303
Registered: ‎05-22-2012
Message 16 of 17 (316 Views)

Re: HP SiteScope - Any way to poll information from SiteScope using an API

The milliseconds timestamp has 13 digits, that could be the reason why that is not working on your lab, try with these dates:

 

startTime:  1391989400000

endTime:    1391990400000

 

Best Regards,

Gunnar López
HP Support
If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
Please use plain text.
Valued Contributor
RYU123
Posts: 346
Registered: ‎10-09-2012
Message 17 of 17 (312 Views)

Re: HP SiteScope - Any way to poll information from SiteScope using an API

Thanks it worked.
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation