- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2024 03:44 AM
Hi,
I've duplicateed the database view [sn_itmon_http_entrypoint] to a new one which includes all tcp entrypoints and not just the http(s) ones. I would like to use that view to filter CIs in an ACC policy. The database view configuration is identical to the original one, just that it uses the tcp tables instead of the http ones:
But I'm not able to use this in the ACC policy to select CIs. Only the original view is listed:
I guess, I'm missing something?
Thanks for your help
Thorsten
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2024 12:24 PM
Hi.
That script failed on publishing for me as well. But this one seemed to get published.
(function getMonitoredCiType(){
var monitoredCis = new GlideRecord('sn_itmon_http_entrypoint');
monitoredCis.addQuery('ip_address', '!=', '');
monitoredCis.query();
return monitoredCis;
})();
Not sure it works though, that query should return dbview records and I assume you would like the CI records from those dbview records?
Regards,
Niklas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2024 02:24 AM
Hi Niklas,
wow, that is a great find! I tried to modify the policy and added my view into the script, but the entry in the table field is missing. And I can't pick the sn_agent_policy table from the list. Weird.
For now I stick to the other option
Thanks again for your help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2024 01:47 AM
Hi,
yes, that works like a treat. As mentioned in the description I ommitted the call to monitoredCis.query() and just added the return command.
And I had to change the addQuery statement as the field names get prefixed in dbviews.
Thanks a lot for your help