HP SiteScope - Any way to poll information from SiteScope using an API (567 Views)
Reply
Valued Contributor
RYU123
Posts: 350
Registered: ‎10-09-2012
Message 1 of 17 (567 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,

HP Expert
Gunnar_L
Posts: 304
Registered: ‎05-22-2012
Message 2 of 17 (563 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.
Valued Contributor
RYU123
Posts: 350
Registered: ‎10-09-2012
Message 3 of 17 (556 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"
HP Expert
Gunnar_L
Posts: 304
Registered: ‎05-22-2012
Message 4 of 17 (542 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.
HP Expert
kenneth.gonzalez
Posts: 1,694
Registered: ‎04-28-2011
Message 5 of 17 (535 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
HP Expert
Gunnar_L
Posts: 304
Registered: ‎05-22-2012
Message 6 of 17 (529 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.
Valued Contributor
RYU123
Posts: 350
Registered: ‎10-09-2012
Message 7 of 17 (520 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?

HP Expert
Gunnar_L
Posts: 304
Registered: ‎05-22-2012
Message 8 of 17 (505 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.
Valued Contributor
RYU123
Posts: 350
Registered: ‎10-09-2012
Message 9 of 17 (498 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

HP Expert
Gunnar_L
Posts: 304
Registered: ‎05-22-2012
Message 10 of 17 (493 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.
Valued Contributor
RYU123
Posts: 350
Registered: ‎10-09-2012
Message 11 of 17 (486 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

HP Expert
Gunnar_L
Posts: 304
Registered: ‎05-22-2012
Message 12 of 17 (466 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.
Valued Contributor
RYU123
Posts: 350
Registered: ‎10-09-2012
Message 13 of 17 (460 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?
HP Expert
Gunnar_L
Posts: 304
Registered: ‎05-22-2012
Message 14 of 17 (457 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.
Valued Contributor
RYU123
Posts: 350
Registered: ‎10-09-2012
Message 15 of 17 (453 Views)

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

13 digits??? I only count 10 digits

HP Expert
Gunnar_L
Posts: 304
Registered: ‎05-22-2012
Message 16 of 17 (448 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.
Valued Contributor
RYU123
Posts: 350
Registered: ‎10-09-2012
Message 17 of 17 (444 Views)

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

Thanks it worked.
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.