From d2b1d8594476e3ca32668a8c5f7e09cd7753df41 Mon Sep 17 00:00:00 2001 From: Rampriya <114834474+Rampriya-S@users.noreply.github.com> Date: Wed, 1 Oct 2025 20:06:09 -0400 Subject: [PATCH] =?UTF-8?q?Create=20Application=20CI=20Count=20=E2=80=93?= =?UTF-8?q?=20Non-Operational=20&=20Installed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Counts all application CIs where operational_status = 2 (non-operational) and install_status = 1 (installed). Outputs the total count to system logs for quick health and compliance checks. --- ...I Count \342\200\223 Non-Operational & Installed" | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 "Application CI Count \342\200\223 Non-Operational & Installed" diff --git "a/Application CI Count \342\200\223 Non-Operational & Installed" "b/Application CI Count \342\200\223 Non-Operational & Installed" new file mode 100644 index 0000000000..8cf6404112 --- /dev/null +++ "b/Application CI Count \342\200\223 Non-Operational & Installed" @@ -0,0 +1,12 @@ +var ga = new GlideAggregate('cmdb_ci_appl'); +ga.addQuery('operational_status', 2); // Non-operational +ga.addQuery('install_status', 1); // Installed +ga.addAggregate('COUNT'); +ga.query(); + +var total = 0; +if (ga.next()) { + total = ga.getAggregate('COUNT'); +} + +gs.info('Application CIs installed but not in operational count: ' + total);