Citrix Cloud Monitoring



Show first post

46 replies

Hello All,

I am also not able to locate and Install Cloud Connector property source: Locator JYW9D7

Can anyone help the number of people who asked on this page how to do this now?

Many thanks

Userlevel 7
Badge +20

As far as I can tell (still not sure if i'm using the new exchange right), that module doesn't exist on the exchange anymore.

Userlevel 2
Badge

Hi,

 

Has anyone had any issues with the datasources recently, whenever i do a poll now on any of the datasources i get the below error. Is anyone aware if the service URL has changed?

 

Thanks,

James

 

The script failed, elapsed time: 3 seconds - Unable to determine the current character, it is not a string, number, array, or objectThe current character read is 'A' with an int value of 65Unable to determine the current character, it is not a string, number, array, or objectline number 1index number 0Access denied to query Monitor objects : Invalid Service URL^groovy.json.JsonException: Unable to determine the current character, it is not a string, number, array, or objectThe current character read is 'A' with an int value of 65Unable to determine the current character, it is not a string, number, array, or objectline number 1index number 0Access denied to query Monitor objects : Invalid Service URL^	at groovy.json.internal.JsonParserCharArray.decodeValueInternal(JsonParserCharArray.java:206)	at groovy.json.internal.JsonParserCharArray.decodeValue(JsonParserCharArray.java:157)	at groovy.json.internal.JsonParserCharArray.decodeFromChars(JsonParserCharArray.java:46)	at groovy.json.internal.JsonParserCharArray.parse(JsonParserCharArray.java:384)	at groovy.json.internal.BaseJsonParser.parse(BaseJsonParser.java:112)	at groovy.json.JsonSlurper.parseText(JsonSlurper.java:205)	at groovy.json.JsonSlurper$parseText.call(Unknown Source)	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)	at Script2.getCitrixData(Script2.groovy:71)	at Script2$getCitrixData.callCurrent(Unknown Source)	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:157)	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:177)	at Script2.run(Script2.groovy:36)
Userlevel 4
Badge +4

Hi,

 

Has anyone had any issues with the datasources recently, whenever i do a poll now on any of the datasources i get the below error. Is anyone aware if the service URL has changed?

 

Thanks,

James

 

The script failed, elapsed time: 3 seconds - Unable to determine the current character, it is not a string, number, array, or objectThe current character read is 'A' with an int value of 65Unable to determine the current character, it is not a string, number, array, or objectline number 1index number 0Access denied to query Monitor objects : Invalid Service URL^groovy.json.JsonException: Unable to determine the current character, it is not a string, number, array, or objectThe current character read is 'A' with an int value of 65Unable to determine the current character, it is not a string, number, array, or objectline number 1index number 0Access denied to query Monitor objects : Invalid Service URL^	at groovy.json.internal.JsonParserCharArray.decodeValueInternal(JsonParserCharArray.java:206)	at groovy.json.internal.JsonParserCharArray.decodeValue(JsonParserCharArray.java:157)	at groovy.json.internal.JsonParserCharArray.decodeFromChars(JsonParserCharArray.java:46)	at groovy.json.internal.JsonParserCharArray.parse(JsonParserCharArray.java:384)	at groovy.json.internal.BaseJsonParser.parse(BaseJsonParser.java:112)	at groovy.json.JsonSlurper.parseText(JsonSlurper.java:205)	at groovy.json.JsonSlurper$parseText.call(Unknown Source)	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)	at Script2.getCitrixData(Script2.groovy:71)	at Script2$getCitrixData.callCurrent(Unknown Source)	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:157)	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:177)	at Script2.run(Script2.groovy:36)

Hi James

Have the same problem since last Thursday. Rebuilding the Secure Client on Citrix and the new API token in LM did not bring any improvement. Any news about this? Would be grateful :)

 

Userlevel 4
Badge +4

Hi James

In case you haven't noticed - I briefly checked the query this morning and for unknown reasons it now works again for me

Greetings
Dorian

Hello,

I am new to LM, and have managed to setup the Citrix Cloud.

We would have to migrate to the new Citrix Cloud API by 30th June and i am struggling to modify the Citrix_Cloud_OAuth_Token..

Any help\guidance\direction would be appreciated.


Following is the partial code that fails with the error below : 

def clientId = hostProps.get("citrix.cloud.id");
def clientSecret = hostProps.get("citrix.cloud.pass");
def devid = hostProps.get("system.deviceID");

// post the request, add the above parameters to the body of request
CloseableHttpClient httpclient = HttpClients.createDefault();

httpPost = new HttpPost("https://api-us.cloud.com/cctrustoauth2/root/tokens/clients");
httpPost.setHeader("Accept", "application/json");
httpPost.setHeader("Content-Type", "application/x-www-form-urlencoded");

httpPost.setEntity(new StringEntity("{\'grant_type\':\'client_credentials\',\'client_id\':\'" + clientId + "\',\'client_secret\':\'" + clientSecret + "\'}", ContentType.create("application/json")));
response = httpclient.execute(httpPost);
responseBody = EntityUtils.toString(response.getEntity());
ctxcode = response.getStatusLine().getStatusCode();

// Parse the bearer token from the JSON output
json_slurper = new JsonSlurper();
response_obj = json_slurper.parseText(responseBody);

httpclient.close();

=======================================================

Error returned : 

"error": "unsupported_grant_type",
  "error_description": "grant_type must be set to client_credentials"

========================================================

Thanks

Userlevel 4
Badge +4

Hi Manaf

What do you want to customize the OAuth token for? This is automatically created by the DataSource "Citrix Cloud OAuth Token".
Did you set all properties correctly (Client Secret of Citrix Cloud, API Token of LM) or did you try to set them again?
What happens if you make a Poll Now on the OAuth Token DataSource? Do you get the same error?

Greetings
Dorian

Hi Dorian,

Thanks for your reply!

I don’t intend to modify the token but how\where the token is being retrieved.

I got the below notification, and interpret that this Citrix Cloud DataSource would stop working after 30th June.

 

At present, it all works without any issues. But would stop after 30th June 2023

The new endpoint information from Citrix can be found here : https://developer.cloud.com/citrix-cloud/citrix-cloud-api-overview/docs/get-started-with-citrix-cloud-apis.

 

Thanks

Userlevel 1
Badge

Hello - i had the same issue with the Service URL Error - looking into the Scripts i found that not all Query are set correct after changing to the new API Gateway. However i just get good results for the DaaS Service like Sessions active etc. Other Queries like Logon Perf. etc. brings back no Data.

Hi @Magna_FL

If you are referring to the DS LogonPerformance, the URI and query would have to be modified.
you need to remove “data” from the query path.

For instance, LogonPerformance DS -
the modified URI would be - "https:/api gateway/monitorodata" + query
and modified query would be - "/Sessions?\$filter=EndD and so on……..” - without the word “data“ in the path.

You can refer this link that lists the available api gateway data sets,
https://developer-docs.citrix.com/en-us/monitor-service-odata-api/current-release.html#urls-for-available-data-sets.

Hello, Looking at the Citrix_Cloud_DeliveryGroups datasource, does anyone know why the max TotalMachines shown is 100 even though we have a total of 1800?  

Thanks,

David

Userlevel 1
Badge

Hello, Looking at the Citrix_Cloud_DeliveryGroups datasource, does anyone know why the max TotalMachines shown is 100 even though we have a total of 1800?  

Thanks,

David

Hello David, i have the same issue. I think its more related to the API just giving you the first 100 results. I have changed the queries a bit that he is paging the results but still i get 100 as Total Machines in the DG

Thanks Magna, I will keep amending the script to see how far I can get.

Userlevel 1
Badge

It seems me more that Citrix even changed some fields and thats why the calculation is not working correct. We will try to see what we can change on the scirpt in the next days and see to get it working correct again. If anybody has a complete solution it would be nice to share. Thanks

Userlevel 3
Badge +2

Hi,

 

Has anyone had any issues with the datasources recently, whenever i do a poll now on any of the datasources i get the below error. Is anyone aware if the service URL has changed?

 

Thanks,

James

 

The script failed, elapsed time: 3 seconds - Unable to determine the current character, it is not a string, number, array, or objectThe current character read is 'A' with an int value of 65Unable to determine the current character, it is not a string, number, array, or objectline number 1index number 0Access denied to query Monitor objects : Invalid Service URL^groovy.json.JsonException: Unable to determine the current character, it is not a string, number, array, or objectThe current character read is 'A' with an int value of 65Unable to determine the current character, it is not a string, number, array, or objectline number 1index number 0Access denied to query Monitor objects : Invalid Service URL^	at groovy.json.internal.JsonParserCharArray.decodeValueInternal(JsonParserCharArray.java:206)	at groovy.json.internal.JsonParserCharArray.decodeValue(JsonParserCharArray.java:157)	at groovy.json.internal.JsonParserCharArray.decodeFromChars(JsonParserCharArray.java:46)	at groovy.json.internal.JsonParserCharArray.parse(JsonParserCharArray.java:384)	at groovy.json.internal.BaseJsonParser.parse(BaseJsonParser.java:112)	at groovy.json.JsonSlurper.parseText(JsonSlurper.java:205)	at groovy.json.JsonSlurper$parseText.call(Unknown Source)	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)	at Script2.getCitrixData(Script2.groovy:71)	at Script2$getCitrixData.callCurrent(Unknown Source)	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:157)	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:177)	at Script2.run(Script2.groovy:36)

Hi James

Have the same problem since last Thursday. Rebuilding the Secure Client on Citrix and the new API token in LM did not bring any improvement. Any news about this? Would be grateful :)

 

i am seeing the same error. any ideas what could be going wrong?

Userlevel 1
Badge

Hi @Tim OShea from the shown Error you are using a Wrong Service Url in your Query. Which Url do you have set in your Script?

Userlevel 3
Badge +2

Hi @Tim OShea from the shown Error you are using a Wrong Service Url in your Query. Which Url do you have set in your Script?

thanks. I have been re-reading the threads, and corrected the URL and Customer strings. now have most of the datasources working.

Userlevel 4
Badge +1

After running in to the same issues others have with these DataSources I recreated most of them myself. They are linked in this community post for anyone interested:

 

Userlevel 4
Badge +4

Hi @Tim OShea from the shown Error you are using a Wrong Service Url in your Query. Which Url do you have set in your Script?

I also have problems with the DataSources again. Which URL needs to be adapted in each case? E.g. in the Logon Performance DataSource:
"https://${customer}.xendesktop.net/Citrix/monitor/odata/v4/data/DesktopGroups"
-> is this no longer correct? Presumably the query for this is not correct either.
Unfortunately, I'm not as good at Groovy as I am at PowerShell :/

Hi Gents, 

I cannot find the Property Source required for this to work named “Cloud Connector” Locator JYW9D7

Can anyone help me find it please?

Thanks

Userlevel 3
Badge +2

@dorian.fuchs

Hi @Tim OShea from the shown Error you are using a Wrong Service Url in your Query. Which Url do you have set in your Script?

I also have problems with the DataSources again. Which URL needs to be adapted in each case? E.g. in the Logon Performance DataSource:
"https://${customer}.xendesktop.net/Citrix/monitor/odata/v4/data/DesktopGroups"
-> is this no longer correct? Presumably the query for this is not correct either.
Unfortunately, I'm not as good at Groovy as I am at PowerShell :/

I changed 
httpGet = new HttpGet("https://${customer}.xendesktop.net/Citrix/monitor/odata/v4/data/DesktopGroups");

to
api_endpoint = "https://api-eu.cloud.com/monitordata";
httpGet = new HttpGet(api_endpoint+"/DesktopGroups");

and 
httpGet.addHeader("Customer" , customer);
to
httpGet.addHeader("Citrix-CustomerId" , customer);

as per the following...

CloseableHttpClient httpclient = HttpClients.createDefault();
//httpGet = new HttpGet("https://${customer}.xendesktop.net/Citrix/monitor/odata/v4/data/DesktopGroups");
api_endpoint="https://api-eu.cloud.com/monitorodata"
httpGet = new HttpGet(api_endpoint+"DesktopGroups");
httpGet.addHeader("Authorization" , "CWSAuth bearer= " + token)
//httpGet.addHeader("Customer" , customer);
httpGet.addHeader("Citrix-CustomerID" , customer);
response = httpclient.execute(httpGet);
responseBody = EntityUtils.toString(response.getEntity());
code = response.getStatusLine().getStatusCode();
json_slurper = new JsonSlurper();
response_obj = json_slurper.parseText(responseBody);

I dont think i had to change anything else, but it was a while ago I’m afraid.

 

Reply