Operations Screen process only critical alerts
Operations Screen process only critical alerts
I created a user for command center, not an admin. THen i created a service template and added the command center user to it. Sending this alerts to Operations screen for the command center folks to monitor. I am trying to send only critical not warnings. Is it possible to send only critical not other alerts to the operations screen.
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Operations Screen process only critical alerts
You can't do that on the Operations Screen. Have you tried the Operations Center?
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Operations Screen process only critical alerts
@rjmon, You could tweak the source code. Disclaimer: You'd be doing this at your own risk as this hasn't really been tested, obviously.
Open this file:
And change this:
To this:
Save and exit. Next, open:
Find this:
And replace it with:
Open this file:
Code: Select all
nano /usr/local/nagiosxi/html/includes/components/opscreen/merlin.phpCode: Select all
<?php
$save = "";
while ($row = mysql_fetch_array($result)) {
$class = "";
if ($row['current_state'] == 2) {
$class = "critical";
} elseif ($row['current_state'] == 1) {
$class = "warning";
} else {
$class = "unknown";
}
?>Code: Select all
<?php
$save = "";
while ($row = mysql_fetch_array($result)) {
$class = "";
if ($row['current_state'] == 2) {
$class = "critical";
} elseif ($row['current_state'] == 1) {
$class = "unknown";
} else {
$class = "unknown";
}
?>Code: Select all
nano /usr/local/nagiosxi/html/includes/components/opscreen/opscreen.phpCode: Select all
.unknown {
background: -moz-linear-gradient(top center, #FFC45F 50%, #FFC45F 50%);
}
Code: Select all
.unknown {
background: -moz-linear-gradient(top center, #FFC45F 50%, #FFC45F 50%);
display: none !important;
}As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Operations Screen process only critical alerts
@npolovenko Thanks. It works but it applies to every role.. Admin cannot see warning alerts. I will use this method for now.
Re: Operations Screen process only critical alerts
Thanks. I have`nt tried to filter in operations center yet. I will try it and let you know.dwhitfield wrote:You can't do that on the Operations Screen. Have you tried the Operations Center?
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Operations Screen process only critical alerts
One thing to note about the changes @npolovenko suggested: these will be overwritten on upgrade, so make sure you have a backup and add restoring to the changes to your upgrade process.