Skip to content

Commit 8532d69

Browse files
authored
Create health_check.js
1 parent 43e4fb3 commit 8532d69

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
var ga = new GlideAggregate('cmdb_ci_appl');
2+
ga.addQuery('operational_status', 2); // Non-operational
3+
ga.addQuery('install_status', 1); // Installed
4+
ga.addAggregate('COUNT');
5+
ga.query();
6+
var total = 0;
7+
if (ga.next()) {
8+
total = ga.getAggregate('COUNT');
9+
}
10+
gs.info('Application CIs installed but not in operational count: ' + total);

0 commit comments

Comments
 (0)