Machines property in Query Logs filter

1130
4
12-12-2019 01:54 AM
jorisfrenkel
Frequent Contributor

There is something confusing about the 'machines' property in the Query Logs filter:

Query Logs—ArcGIS REST API: Administer your server | ArcGIS for Developers 

The wildcard for 'machines' seems not to be working in a Python script. But when I use the Admin page:

http://localhost:6080/arcgis/admin/logs/query 

it works OK.

I am using this filter:

logFilter = "{'server': ['*'], 'services': ['*'], 'machines': ['*']}"

I get this response:

{"status":"error","messages":["java.lang.NullPointerException"],"code":500}

I guess this means that no log messages are returned.

When I remove the machines part, it works ok:

logFilter = "{'server': ['*'], 'services': ['*']}"

Any ideas?

I am using ArcGIS 10.6.1.

Joris Frenkel,

Staatsbosbeheer, the Netherlands

Tags (1)
0 Kudos
4 Replies
JacobSnyder1
Esri Contributor

Hi Joris,

Would you be able to try the following?

Instead of using:

logFilter = "{'server': ['*'], 'services': ['*'], 'machines': ['*']}"

Let's try:

logFilter = "{'server': ['*'], 'services': ['*'], 'machines': ['ALL']}"

Does this produce the output that you expected?

Thank you,

Jacob

jorisfrenkel
Frequent Contributor

Thanks, I tried this but it doesn't work.

0 Kudos
JonathanQuinn
Esri Notable Contributor

You can query the logs via Manager to see what request it's sending the Admin API, and it turns out to be an empty dict when querying for all machines:

Via the Admin API, any of the properties in the filter list are not in an array:

If you want to query a machine, then it's passed in as a value within an array:

Easiest approach is monitor the network traffic when making requests via the Admin API or Manager and then re-create them.

jorisfrenkel
Frequent Contributor

Thanks for your reply. 

I decided to leave out the filter. If needed, I will let the script do the filtering.

0 Kudos