GlideAggregate API access to v_cluster_transactions for monitoring
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2024 01:46 AM
Hello,
we want to monitor the active cluster transactions to identify easily long running or stuck jobs. Because it is a v_table and requires a manual refresh at least on UI, we were not able to use GlideAggregate so far.
Is there a trick to still get it there or do you know any other options how to have a get a lightweight API access to this table?
Thank you in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2024 03:22 PM
Hey @Anton42
If you look, that page you are referring to is actually a UI Page. In that UI Page, you can see the code of how the system refreshes the transactions. I would bet you could use the code to come up with some way to automatically refresh the transactions, wait for the action to complete, and then query the table. Here is where you'll find the UI Page: /nav_to.do?uri=sys_ui_page.do?sys_id=2ead2fa30b13120004c1c71437673a88
NOTE: I am unsure on what the system performance impact is of polling each of your nodes on a periodic basis is. Try to make a reasonable judgment for how often you attempt to do this automatically and even, you may consider reaching out to your ServcieNow Solution Consultant to have them confirm there would be no negative side-effects to doing this.
Hope this helps!
~Nick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2024 03:18 AM
Ok. Thank you. How I may call the UI page via REST API from outside? Afterwards I could request the content via Aggregate quite easily. Is it known how long the records remain in virtual tables?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-15-2024 02:59 PM
Hey @Anton42 ,
You wouldn't call the actual UI Page. What I am suggesting is to go copy the code in the UI page for use in a scripted REST call (which it sounds like is what you'd need).
I am hesitant to include the code here for you since as mentioned, I am unsure of the consequence of automating that call. So, check out the UI Page and see if the code that is there is helpful to you. I am happy to answer general questions to help out, I just don't feel comfortable including the code for you.
Hope that helps!
~Nick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-16-2024 12:45 AM
Hello. Thanks, I understand. So, can refreshing the page and using glide aggregate be done in one rest call or should they be in different ones?
Actually I do not want to allow the 3rd party app to use the rest call. In best case, I just want to provide a glideaggregate api endpoint. So, would it be possible to distinguish between refreshing and api endpoint and maybe even refreshing the page only via a scheduled job?
Is it known, for how long the information resides in a v table until it gets flushed?
Thank you.