Skip to content
Permalink
Browse files

Add perfdata_cutoff to NEMS SST.

  • Loading branch information...
NEMS Linux
NEMS Linux committed Sep 10, 2019
1 parent 22ed7b9 commit 184f606bd78cf96768336b26dc5f71fa449f5200
Showing with 25 additions and 0 deletions.
  1. +25 −0 config/index.php
@@ -169,6 +169,7 @@
}
if (is_array($nemsconf) && isset($_POST) && count($_POST) > 0) { // Overwrite the existing conf data
// only need to include the conf options that are included in NEMS SST. The rest will be re-written from existing values.
$nemsconf['perfdata_cutoff'] = intval($_POST['perfdata_cutoff']) ?: 0;
$nemsconf['tv_require_notify'] = sanitize($_POST['tv_require_notify']);
$nemsconf['tv_24h'] = sanitize($_POST['tv_24h']);
$nemsconf['osbpass'] = sanitize($_POST['osbpass']);
@@ -403,6 +404,30 @@ function sanitize($string) {
</div>


<div class="row" style="background: #fff; margin: 0;">

<div class="col-md-4">
<header>Maintenance</header>
<fieldset>
<section>
<label class="label">Performance Data Retention (ie., for NagiosGraphs)</label>
<label class="select">
<select name="perfdata_cutoff">
<option value="0"<?php if (!isset($nemsconf['perfdata_cutoff']) || $nemsconf['perfdata_cutoff'] == 0) echo ' SELECTED'; ?>>Keep Indefinitely</option>
<option value="365"<?php if (isset($nemsconf['perfdata_cutoff']) && $nemsconf['perfdata_cutoff'] == 365) echo ' SELECTED'; ?>>365 Days</option>
<option value="180"<?php if (isset($nemsconf['perfdata_cutoff']) && $nemsconf['perfdata_cutoff'] == 180) echo ' SELECTED'; ?>>180 Days</option>
<option value="90"<?php if (isset($nemsconf['perfdata_cutoff']) && $nemsconf['perfdata_cutoff'] == 90) echo ' SELECTED'; ?>>90 Days</option>
<option value="30"<?php if (isset($nemsconf['perfdata_cutoff']) && $nemsconf['perfdata_cutoff'] == 30) echo ' SELECTED'; ?>>30 Days</option>
<option value="7"<?php if (isset($nemsconf['perfdata_cutoff']) && $nemsconf['perfdata_cutoff'] == 7) echo ' SELECTED'; ?>>7 Days</option>
</select>
<i></i>
</label>
</section>
</fieldset>

</div>
</div>

<div class="row" style="background: #fff; margin: 0;">

<div class="col-md-4">

0 comments on commit 184f606

Please sign in to comment.
You can’t perform that action at this time.