SiteScope API Usage getQuickReport (828 Views)
Reply
Occasional Contributor
Anand_Jayaraman
Posts: 6
Registered: ‎02-14-2014
Message 1 of 13 (828 Views)

SiteScope API Usage getQuickReport

Hi,

 

I am using SiteScope 11.22 version.

 

I am trying to invoke the WebService getQuickReport using a Standalone Java Client.

 

When i invoke the API i get an exception:

 

Exception in thread "main" AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: com.mercury.sitescope.api.configuration.exception.ExternalServiceAPIException: The entity path [XXXX] does not match any valid entity (Monitor or Group).
faultActor:
faultNode:
faultDetail:
{http://configuration.api.sitescope.mercury.com}fault:<errorCode xsi:type="xsd:long">55720</errorCode><errorMessage xsi:type="xsd:string">The entity path [XXXXX] does not match any valid entity (Monitor or Group).</errorMessage>
{http://xml.apache.org/axis/}hostname:TEST123

 

I am giving the path based on how i see the monitor being shown on the Site Scope site.

 

For e.g String[] path = {"First level group","Second level group","Name of monitor"}

 

Let me know if this is correct. Please do share with me any example of how to give the path of the monitor, so that i can can resolve the exception.

 

Thanks,

Anand

HP Expert
kenneth.gonzalez
Posts: 1,686
Registered: ‎04-28-2011
Message 2 of 13 (793 Views)

Re: SiteScope API Usage getQuickReport

Hi Anand,

Please refer to API javadoc documentation to check on method parameters and format: \SiteScope\examples\integrations\api\doc\javadoc

fullPathToEntity - A String array specifying the full path to the entity. The path starts with the name of the first child under the SiteScope's root, and ends with the name of the entity.

please confirm this is correct.
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
Occasional Contributor
Anand_Jayaraman
Posts: 6
Registered: ‎02-14-2014
Message 3 of 13 (777 Views)

Re: SiteScope API Usage getQuickReport

Hi,

 

Followed just that, it didn't resolve the issue for me.

 

Is the hierarchy shown in the UI is the way you need to access in API?

 

For e.g.

 

SiteScope --> Test 1 (Folder)-->Test 2 (Folder)--> Monitor 1 (Name of Monitor)

 

So the path is

 

String[] fullPath ={"Test1","Test2","Monitor 1"}

 

I tried just that still the same exception. Can you please tell me if API needs any specific permission to read the path?

 

Regards,

Anand

HP Expert
kenneth.gonzalez
Posts: 1,686
Registered: ‎04-28-2011
Message 4 of 13 (767 Views)

Re: SiteScope API Usage getQuickReport

Hi,

Is there any special character or white space in any folder/monitor name in the path?
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
Occasional Contributor
Anand_Jayaraman
Posts: 6
Registered: ‎02-14-2014
Message 5 of 13 (747 Views)

Re: SiteScope API Usage getQuickReport

Hi,

 

I have tried a folder which doesn't have whitespace or special character. It still didn't work, is there a permission issue here?

 

Regards,

Anand

HP Expert
kenneth.gonzalez
Posts: 1,686
Registered: ‎04-28-2011
Message 6 of 13 (741 Views)

Re: SiteScope API Usage getQuickReport

Hi,

I don't thinks so. Since you're calling the API from Java code it would be a good test to try the method from a SOAP client like SoapUI first. Maybe for some reason the path is not being sent correctly.
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
Occasional Contributor
Anand_Jayaraman
Posts: 6
Registered: ‎02-14-2014
Message 7 of 13 (733 Views)

Re: SiteScope API Usage getQuickReport

Hi,

 

Did that same result. Is there a test data and a sample code you can include? I can try doing the same on my setup and test.

 

Regards,

Anand

HP Expert
kenneth.gonzalez
Posts: 1,686
Registered: ‎04-28-2011
Message 8 of 13 (723 Views)

Re: SiteScope API Usage getQuickReport

Hi,

 

I have a group called Kenneth which contains a JMX monitor called "SiS thread count and heapspace" for which I build the getQuickReport SOAP call attached:

 

2014-03-04_1031.png

 

and got attached response in SoapUI which gives extract of the URL for the report, e.g:

 

<getQuickReportReturn xsi:type="xsd:string"><![CDATA[/SiteScope/servlet/ReportsCGIAdapter?_upTimeIncludeWarning=&reportType=barGraph&showSummary=on&locale=en_US&closeLink=true&endTime=1393948723&startTime=1393946923&_failureNotIncluded=&showWarnings=on&showTables=on&mailTemplate=HistoryMail&page=adhocReport&detailed=&attachReport=on&isSwingContext=false&_warningNotIncluded=&showErrors=on&precision=default&schedFilter=&vmax=&_showReportThresholdSummary=&format=&_showGraphs=on&_showReportAlerts=&_class=ReportQuick&end_time=-1800000&email=&mainLink=on&reportFrmType=html&context=&start_time=-3600000&statusFilter=&_showReportErrorTimeSummary=&showGoods=on&_targetList=10009+6&bestCaseCalc=&sis_silent_login_type=encrypted&login=admin&password=admin]]></getQuickReportReturn>

 

Check if you can do same test. 

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
Occasional Visitor
rajanikumarv
Posts: 3
Registered: ‎02-06-2014
Message 9 of 13 (671 Views)

Re: SiteScope API Usage getQuickReport

Thanks much ! me and Ananad could successfully place the call and could get the right xml response. we are now trying to get uptime stats using SiteScopeDataAcquisitionCommandLineUtil. we need the uptime percentage of a specific monitor as a return value for a given period of time.

 

ref : http://sitescope.tellurian.net/SiteScope/docs/History.htm

 

we need data for uptime calculation to be done from a standalone java batch from sitescope. please let us know which specific method could be used for the same. if anyone can help us with a working example it would be of great help to us.

HP Expert
kenneth.gonzalez
Posts: 1,686
Registered: ‎04-28-2011
Message 10 of 13 (659 Views)

Re: SiteScope API Usage getQuickReport

[ Edited ]

Hi,

I haven't found an easier way to get the uptime for a monitor from API other than using getQuickReport and then parse the HTML from output URL. You may use dataAcquisition API but that will give you samples with monitor readings in XML format, for example:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<performanceMonitors collector="SiteScope" collectorHost="SSK3">
<group name="Kenneth" desc="">
<monitor type="URL Monitor" target="tools.ietf.org" targetIP="64.170.98.42" time="1395072600000" quality="1" name="URL: https://tools.ietf.org/html/draft-ietf-tls-ssl-version3-00">
<counter value="" quality="good" name="content match"/>
<counter value="176670.0" quality="good" name="size (bytes)"/>
<counter value="922.0" quality="good" name="roundtrip time (milliseconds)"/>
<counter value="200.0" quality="good" name="overall status"/>
<counter value="5475259.0" quality="good" name="age (seconds)"/>
<counter value="200.0" quality="good" name="status"/>
<counter value="0.0" quality="good" name="total errors (errors)"/>
<counter value="258.0" quality="good" name="certificate expiration days remaining"/>
<counter value="0.0" quality="good" name="deviation percentage (roundtrip time %)"/>
<counter value="0.0" quality="good" name="deviation percentage (dns time %)"/>
<counter value="0.0" quality="good" name="deviation percentage (download time %)"/>
<counter value="0.0" quality="good" name="deviation percentage (connect time %)"/>
<counter value="0.0" quality="good" name="deviation percentage (response time %)"/>
</monitor>
</group>
</performanceMonitors>

So uptime calculation should be on your app/script side and that can be heavy processing.

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
Occasional Visitor
rajanikumarv
Posts: 3
Registered: ‎02-06-2014
Message 11 of 13 (604 Views)

Re: SiteScope API Usage getQuickReport

Thanks Kennith.

 

This is what i get too from DataAquisition.

 

<monitor type="Web Service" target="XXX" targetIP="XXX" time="1395292800000" quality="1" name="XXX Services">
                        <counter value="200.0" quality="good" name="status"/>
                        <counter value="0.031" quality="good" name="round trip time"/>
                        <counter value="" quality="good" name="content match"/>
</monitor>

 

now i have few questions. the counter value 200 means what and is that the value we need to consider for uptime percantage calculation for a specific monitor ?

HP Expert
kenneth.gonzalez
Posts: 1,686
Registered: ‎04-28-2011
Message 12 of 13 (598 Views)

Re: SiteScope API Usage getQuickReport

Hi,

No, that status is a counter of Web Service monitor (status = HTTP 200 OK), this method doesn't give you monitor status along samples, just raw data. So to calculate uptime script should "know" that status=200 is Good, so for a given period of time it counts all samples and calculates average uptime based on how many of them have stats=200.
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
Occasional Contributor
Anand_Jayaraman
Posts: 6
Registered: ‎02-14-2014
Message 13 of 13 (459 Views)

Re: SiteScope API Usage getQuickReport

Hi,

 

I am trying to use the getData API in ApiDataAcquisition. I am sending the following inputs to the API

 

-host "xxx.yyy.com" -port 8080 -useSSL false -login "test_user" -password "test_password" -startTime "19 06 2013 09.00.00 AM" -endTime "19 01 2014 11.00.00 AM" -strFilePath "C:\\logs\\Log.xml" -monitorName "XXX#,#YYY#,#ZZZ#,#ABC"

 

I know for sure there should be atleast one record that should be returned but i don't get any data.

 

Is there something i have missed?

 

Regards,

Anand

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.