</tr> <?php } ?> </table> <?php } else { ?> <div class="statusmsg">No Host Groups Exist</div> <?php } print_window_footer(); print "<br /><br />"; } if (isset($_GET['hostgroup_add'])) { print_window_header("Add A Host Group", "100%"); ?> <form name="command_form" method="post" action="hostgroups.php?hostgroup_add=1"> <input type="hidden" name="request" value="add_hostgroup" /> <b>Host Group Name:</b> <input type="text" name="hostgroup_name" value=""><br /> <?php echo $lilac->element_desc("hostgroup_name", "nagios_hostgroups_desc"); ?> <br /> <br /> <b>Description:</b><br /> <input type="text" size="80" name="alias" value=""><br /> <?php echo $lilac->element_desc("alias", "nagios_hostgroups_desc"); ?> <br />
$period_list[] = array("timeperiod_id" => $period->getId(), "timeperiod_name" => $period->getName()); } $volatile_list[] = array("value" => 0, "label" => "Not Volatile"); $volatile_list[] = array("value" => 1, "label" => "Volatile"); $initialState_list = array(); $initialState_list[] = array('value' => 'o', 'label' => 'Ok'); $initialState_list[] = array('value' => 'w', 'label' => 'Warning'); $initialState_list[] = array('value' => 'c', 'label' => 'Critical'); $initialState_list[] = array('value' => 'u', 'label' => 'Unknown'); // Build subnav $subnav = array('general' => 'General', 'inheritance' => 'Inheritance', 'checks' => 'Checks', 'flapping' => 'Flapping', 'logging' => 'Logging', 'notifications' => 'Notifications', 'servicegroups' => 'Group Membership', 'contacts' => 'Contacts', 'extended' => 'Extended Information', 'dependencies' => 'Dependencies', 'escalations' => 'Escalations'); if (isset($tempServiceTemplateInfo['check_command']) || isset($templateValues['check_command'])) { $subnav['checkcommand'] = "Check Command Parameters"; } print_header("Service Template Editor"); print_window_header("Template Info for " . $serviceTemplate->getName(), "100%"); print_subnav($subnav, $_GET['section'], "section", $_SERVER['PHP_SELF'] . "?id=" . $_GET['id']); $service_template_icon_image = $path_config['image_root'] . "services.gif"; if ($_GET['section'] == 'general') { ?> <table width="100%" border="0"> <tr> <td width="100" align="center" valign="top"> <img src="<?php echo $service_template_icon_image; ?> " /> </td> <td valign="top"> <?php if (isset($_GET['edit'])) {
$subText = "Return To Host " . $escalation->getNagiosHost()->getName(); } else { if ($escalation->getNagiosHostgroup()) { $title .= "Hostgroup <i>" . $escalation->getNagiosHostgroup()->getName() . "</i>"; $sublink = "hostgroups.php?id=" . $escalation->getNagiosHostgroup()->getId(); $subText = "Return To Hostgroup " . $escalation->getNagiosHostgroup()->getName(); } } } } // Build subnav $subnav = array('general' => 'General', 'contacts' => 'Contacts'); print_header("Escalation Editor for " . $title); // Show service information table if selected if ($_GET['id']) { print_window_header($escalation->getDescription() . " Escalation Information", "100%"); print_subnav($subnav, $_GET['section'], "section", $_SERVER['PHP_SELF'] . "?id=" . $_GET['id']); if ($_GET['section'] == 'general') { if (!$escalation->getService() && !$escalation->getServiceTemplate()) { $escalation_image = $path_config['image_root'] . "server.gif"; } else { $escalation_image = $path_config['image_root'] . "services.gif"; } ?> <table width="100%" border="0"> <tr> <td width="100" align="center" valign="top"> <img src="<?php echo $escalation_image; ?> " />
$add_template_list[] = array("host_template_id" => '', "template_name" => "None"); $lilac->get_host_template_list($template_list); if (count($template_list)) { foreach ($template_list as $tempTemplate) { $add_template_list[] = array('host_template_id' => $tempTemplate->getId(), 'template_name' => $tempTemplate->getName()); } } print_header("Add New Host"); $title = "Add A Top-Level Host"; if (isset($_GET['parent_id'])) { $tempHostInfo = NagiosHostPeer::retrieveByPK($_GET['parent_id']); if ($tempHostInfo) { $title = "Add A Host Under " . $tempHostInfo->getName(); } } print_window_header($title, "100%"); ?> <form name="host_add_form" method="post" action="add_host.php<?php if (isset($_GET['parent_id'])) { print "?parent_id=" . $_GET['parent_id']; } ?> "> <input type="hidden" name="request" value="add_host" /> <?php if (isset($_GET['parent_id']) && $_GET['parent_id'] != 0) { ?> <input type="hidden" name="host_manage[parents]" value="<?php echo $_GET['parent_id']; ?> ">
$sublink = "hosts.php?id=" . $service->getNagiosHost()->getId() . "§ion=services"; } else { if ($service->getNagiosHostgroup()) { $subtitle = " for Hostgroup " . $service->getNagiosHostgroup()->getName(); $sublinktitle = "Back To Hostgroup " . $service->getNagiosHostgroup()->getName(); $sublink = "hostgroups.php?id=" . $service->getNagiosHostgroup()->getId() . "§ion=services"; } } } // Build subnav $subnav = array('general' => 'General', 'inheritance' => 'Inheritance', 'checks' => 'Checks', 'flapping' => 'Flapping', 'logging' => 'Logging', 'notifications' => 'Notifications', 'servicegroups' => 'Group Membership', 'contacts' => 'Contacts', 'extended' => 'Extended Information', 'dependencies' => 'Dependencies', 'escalations' => 'Escalations'); if (isset($tempServiceTemplateInfo['check_command']) || isset($serviceValues['check_command'])) { $subnav['checkcommand'] = "Check Command Parameters"; } print_header("Service Editor"); print_window_header("Service Info for " . $service->getDescription() . $subtitle, "100%"); print_subnav($subnav, $_GET['section'], "section", $_SERVER['PHP_SELF'] . "?id=" . $_GET['id']); $service_icon_image = $path_config['image_root'] . "services.gif"; if ($_GET['section'] == 'general') { ?> <table width="100%" border="0"> <tr> <td width="100" align="center" valign="top"> <img src="<?php echo $service_icon_image; ?> " /> </td> <td valign="top"> <?php if (isset($_GET['edit'])) {
<?php } ?> </table> <a class="checkAllLink" href="#">Check All</a> / <a class="uncheckAllLink" href="#">Un-Check All</a> With Selected: <select> <option value="accept">Import</option> <option value="remove">Remove</option> </select> <input type="submit" value="Process" /> </form> <?php } ?> </div> <?php print_window_footer(); } else { print_window_header("Device Details"); ?> [ <a href="autodiscovery.php?id=<?php echo $device->getAutodiscoveryJob()->getId(); ?> &review=1">Return To Device List</a> ] <br /> <br /> <h3>General Information</h3> <table class="tablelist"> <thead> <tr> <td>Address</td> <td>Name</td> <td>Description</td> <td>Parent</td>
<a href="timeperiods.php?timeperiod_id=<?php echo $_GET['timeperiod_id']; ?> &request=delete">Delete</a> <input type="submit" value="Modify Period" /> <a href="timeperiods.php">Cancel</a> <?php } else { ?> <input type="submit" value="Create Period" /> <a href="timeperiods.php">Cancel</a> <?php } ?> <br /><br /> <?php print_window_footer(); } else { print_window_header("Time Period Listings", "100%"); ?> <a class="sublink" href="timeperiods.php?timeperiod_add=1">Add A New Time Period</a><br /> <?php if ($numOfPeriods) { ?> <br /> <table class="listing"> <tr class="altTop"> <td>Period Name</td> <td>Period Description</td> </tr> <?php for ($counter = 0; $counter < $numOfPeriods; $counter++) { if ($counter % 2) { ?>
$date_format_list[] = array("values" => "euro", "text" => "euro - DD/MM/YYYY HH:MM:SS"); $date_format_list[] = array("values" => "iso8601", "text" => "iso8601 - YYYY-MM-DD HH:MM:SS"); $date_format_list[] = array("values" => "strict-iso8601", "text" => "strict-iso8601 - YYYY-MM-DDTHH:MM:SS"); // Let's make the log rotation select list $log_rotate_list[] = array("values" => "n", "text" => "None"); $log_rotate_list[] = array("values" => "h", "text" => "Hourly"); $log_rotate_list[] = array("values" => "d", "text" => "Daily"); $log_rotate_list[] = array("values" => "w", "text" => "Weekly"); $log_rotate_list[] = array("values" => "m", "text" => "Monthly"); if (!isset($_GET['section'])) { $_GET['section'] = 'paths'; } // Build subnavigation $subnav = array('paths' => 'Paths', 'status' => 'Status', 'security' => 'Security', 'restart' => 'Restart Actions', 'logging' => 'Logging', 'external' => 'External Commands', 'retention' => 'Retention', 'global' => 'Global', 'intervals' => 'Intervals', 'flap' => 'Flap', 'timeouts' => 'Timeouts', 'obsess' => 'Obsess', 'freshness' => 'Freshness', 'broker' => 'Broker', 'debug' => 'Debug', 'other' => 'Other'); print_header("Main Configuration File Editor", "main"); print_window_header("Nagios Daemon Configuration", "100%", "center"); print_subnav($subnav, $_GET['section'], "section"); if ($_GET['section'] == 'paths') { ?> <form name="main_config" method="post" action="main.php?section=paths"> <input type="hidden" name="request" value="main_modify_paths" /> <?php double_pane_form_window_start(); ?> <div class="formbox"> <b>Configuration Directory</b><br /> <input type="text" size="80" maxlength="255" name="main_config[config_dir]" value="<?php echo $mainConfig->getConfigDir(); ?> "><br /> <?php
header("Location: service.php?id=" . $service->getId()); die; } } } } } } print_header("Service Editor"); // Get list of service templates $lilac->get_service_template_list($tempList); $template_list[] = array("service_template_id" => '', "template_name" => "None"); foreach ($tempList as $tempTemplate) { $template_list[] = array('service_template_id' => $tempTemplate->getId(), 'template_name' => $tempTemplate->getName()); } print_window_header("Add Service " . $title, "100%"); ?> <form name="service_template_add_form" method="post" action="add_service.php<?php echo $sublink; ?> "> <input type="hidden" name="request" value="add_service" /> <?php double_pane_form_window_start(); ?> <tr bgcolor="eeeeee"> <td colspan="2" class="formcell"> <b>Service Description:</b><br /> <input type="text" size="40" name="service_description" value=""><br /> <?php echo $lilac->element_desc("service_description", "nagios_services_desc");
echo $hostTemplateList[$counter]->getDescription(); ?> </td> </tr> <?php } ?> </table> <?php } else { ?> <div class="statusmsg">No Host Templates Exists</div> <?php } print_window_footer(); print_window_header("Service Templates", "100%"); ?> <a class="sublink" href="add_service_template.php">Add A New Service Template</a><br /> <br /> <?php if ($numOfServiceTemplates) { ?> <table width="100%" align="center" cellspacing="0" cellpadding="2" border="0"> <tr class="altTop"> <td>Service Template Name</td> <td>Description</td> </tr> <?php for ($counter = 0; $counter < $numOfServiceTemplates; $counter++) { if ($counter % 2) { ?>
but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ // Lilac index page require_once 'includes/config.inc'; if (file_exists(dirname(__FILE__) . "/NOTICE")) { // Notice exists, we should display it here. $warning = file_get_contents(dirname(__FILE__) . "/NOTICE"); } print_header(); print_window_header("General Configuration", "100%"); ?> <ul> <li class="general icon-monitor-edit"><a href="main.php">Nagios Daemon Configuration</a><br /> Modify the general configuration of the Nagios Daemon</li> <li class="general icon-application-home"><a href="cgi.php">Nagios Web Interface Configuration</a><br /> Modify the configuration of the Web Interface for Nagios</li> <li class="general icon-book"><a href="resources.php">Nagios Resources</a><br /> Modify the collection of resources to use as Nagios Macros</li> <li class="general icon-application-lightning"><a href="commands.php">Nagios Commands</a><br /> Nagios commands are used to check on devices, notifications and pro-active problem recovery.</li> <li class="general icon-clock"><a href="timeperiods.php">Time Periods</a><br /> Time Periods are used to designate ranges of times and exceptions</li> <li class="general icon-user"><a href="contacts.php">Contacts</a><br /> Manage the collection of people who use the monitoring system</li> <li class="general icon-group"><a href="contactgroups.php">Contact Groups</a><br />
public function renderResults() { global $error; if (count($this->searchResults)) { foreach ($this->searchResults as $group => $results) { print_window_header("Results in " . $this->searchTemplate[$group]['type'] . ": " . count($results), "100%", "center"); ?> <table width="95%" border="0" align="center" cellspacing="0" cellpadding="0"> <tr> <?php if (count($this->searchTemplate[$group])) { foreach ($this->searchTemplate[$group] as $key => $value) { if ($key != "type" && $key != "url") { print "\t<td style=\"padding: 2px; border-bottom: 1px solid #aaaaaa;\"><b>{$value}</b></td>\n"; } } } ?> </tr> <?php $count = 0; $span = count($this->searchTemplate[$group]) - 3; $url = $this->searchTemplate[$group]['url']; if (count($results)) { foreach ($results as $id => $result) { $bgcolor = "#f0f0f0"; if ($count % 2) { $bgcolor = "#cccccc"; } print "<tr style=\"background-color: {$bgcolor}\">\n"; $n = 0; if (count($this->searchTemplate[$group])) { foreach ($this->searchTemplate[$group] as $key => $value) { if ($key != "type" && $key != "url") { if ($n == 0) { print "\t<td style=\"padding: 2px; border-left: 1px solid #aaaaaa; border-bottom: 1px solid #aaaaaa;\" valign=\"top\">"; } elseif ($n == $span) { print "\t<td style=\"padding: 2px; border-right: 1px solid #aaaaaa; border-bottom: 1px solid #aaaaaa;\" valign=\"top\">"; } else { print "\t<td style=\"padding: 2px; border-bottom: 1px solid #aaaaaa;\" valign=\"top\">"; } if (strlen($result->{$key}()) == 0) { $temp = " "; } else { $temp = "<a href=\"" . str_replace("@1@", $id, $url) . "\">" . $result->{$key}() . "</a>"; } print $temp . "</td>\n"; $n++; } } } $count++; print "</tr>\n"; } } ?> </table> <br /> <?php print_window_footer(); } } }
<a href="commands.php?command_id=<?php echo $command->getId(); ?> &request=delete">Delete</a> <input type="submit" value="Modify Command" /> <a href="commands.php">Cancel</a> <?php } else { ?> <input type="submit" value="Create Command" /> <a href="commands.php">Cancel</a> <?php } ?> <br /><br /> <?php print_window_footer(); } else { print_window_header("Nagios Commands", "100%"); ?> <a class="sublink" href="commands.php?command_add=1">Add A New Command</a><br /> <?php if ($numOfCommands) { ?> <br /> <table width="100%" align="center" cellspacing="0" cellpadding="2" border="0"> <tr class="altTop"> <td>Command Name</td> <td>Command Description</td> </tr> <?php for ($counter = 0; $counter < $numOfCommands; $counter++) { if ($counter % 2) { ?>
<div id="completemsg" class="roundedcorner_success_box" <?php if ($exportJob->getStatusCode() != ExportJob::STATUS_FINISHED) { ?> style="display: none;"<?php } ?> > <div class="roundedcorner_success_top"><div></div></div> <div class="roundedcorner_success_content"> Export Job Complete. Content Exported Successfully. </div> <div class="roundedcorner_success_bottom"><div></div></div> </div> <a href="export.php?id=<?php echo $exportJob->getId(); ?> &action=restart">Restart Job</a> | <a href="export.php?id=<?php echo $exportJob->getId(); ?> &delete=1" onclick="javascript:confirmDelete();">Remove Job</a> | <a href="export.php">Return To Exporter</a> <?php print_window_footer(); print_window_header("Job Log"); ?> <div id="joblog"> </div> <?php print_window_footer(); } print_footer();
</fieldset> <p> <input type="checkbox" <?php if ($mysqlPopulate) { echo "checked=\"checked\""; } ?> name="mysqlPopulate" id="populatedb"><label for="populatedb">Populate Database With Sample Data (Uncheck if you want to keep existing data or upgrading) <strong>Warning:</strong> This will remove any existing data! You should back-up any existing data.</label> </p> <input class="submit" type="submit" value="Continue" /> <?php print_window_footer(); } else { if ($stage == 2 && $success) { // OMGZ! print_window_header("Installation Complete"); ?> Congratulations! <p> Your lilac installation is now complete. You should remove the <em>install.php</em> script as it is no longer needed. You can also remove the write privileges to the <em>includes</em> directory. </p> <fieldset class="regform" id="regform"> <legend>Want to help us improve Lilac?</legend> <p> We're very interested in knowing who is using Lilac and how they're using the tool. Fill out the completely optional form below to help us improve Lilac's future releases. Or you can choose to <a href="index.php">Launch Lilac Now</a>. </p> <p> <label for="organizationName">Organization's Name: </label><input type="text" id="organizationName" name="organizationName" /> </p> <p> <label for="organizationCountry">Country Your Organization Is In: </label><select name="organizationCountry" id="organizationCountry" style="width:150px;">
</tr> <?php } ?> </table> <?php } else { ?> <div class="statusmsg">No Service Groups Exist</div> <?php } print_window_footer(); print "<br /><br />"; } if (isset($_GET['servicegroup_add'])) { print_window_header("Add A Service Group", "100%"); ?> <form name="servicegroup_form" method="post" action="servicegroups.php"> <input type="hidden" name="request" value="add_servicegroup" /> <b>Service Group Name:</b> <input type="text" name="servicegroup_name" value=""><br /> <?php echo $lilac->element_desc("servicegroup_name", "nagios_servicegroups_desc"); ?> <br /> <br /> <b>Description:</b><br /> <input type="text" size="80" name="alias" value=""><br /> <?php echo $lilac->element_desc("alias", "nagios_servicegroups_desc"); ?> <br />
} else { $tempExclusion = new NagiosTimeperiodExclude(); $tempExclusion->setNagiosTimeperiodRelatedByExcludedTimeperiod($targetTimeperiod); $tempExclusion->setNagiosTimeperiodRelatedByTimeperiodId($timeperiod); $tempExclusion->save(); $success = "Exclusion added."; } } } } } } // Create subnav $subnav = array('general' => 'General', 'entries' => 'Time Entries', 'exclusions' => 'Exclusions'); print_header("Time Period Editor"); print_window_header("Modify A Time Period - " . $timeperiod->getName(), "100%"); print_subnav($subnav, $_GET['section'], "section", $_SERVER['PHP_SELF'] . "?timeperiod_id=" . $timeperiod->getId()); if ($_GET['section'] == 'general') { ?> <form name="timeperiod_form" method="post" action="timeperiod.php?timeperiod_id=<?php echo $timeperiod->getId(); ?> "> <input type="hidden" name="request" value="modify_period" /> <input type="hidden" name="timeperiod_manage[timeperiod_id]" value="<?php echo $timeperiod->getId(); ?> "> <b>Time Period Name:</b><br /> <input type="text" name="timeperiod_manage[timeperiod_name]" value="<?php echo isset($timeperiod) ? $timeperiod->getName() : '';
break; } $dependency->setName($_POST['name']); $dependency->save(); header("Location: dependency.php?id= " . $dependency->getId()); exit; } } } if ($type == "service") { $textTitle = $tempSource->getOwnerDescription() . " : " . $tempSource->getDescription(); } else { $textTitle = $tempSource->getName(); } print_header("Add Dependency To " . $title . " " . $textTitle); print_window_header("Add Dependency To " . $title . " " . $textTitle, "100%"); ?> <strong>Provide A Name for this Dependency</strong> <form action="add_dependency.php?<?php echo $fieldName; ?> =<?php echo $tempSource->getId(); ?> " method="post"> <input type="hidden" name="request" value="add_dependency" /> <input id="name" type="text" size="20" name="name" value="" /><br /> <input type="submit" value="Create Dependency" /> <br /> <br /><a href="<?php echo $link;
} } } $escalation->setDescription(trim($_POST['escalation_description'])); $escalation->save(); header("Location: escalation.php?id=" . $escalation->getId()); die; } } if ($type == "service") { $textTitle = $tempSource->getNagiosHost()->getName() . " : " . $tempSource->getDescription(); } else { $textTitle = $tempSource->getName(); } print_header("Add Escalation To " . $title . " " . $textTitle); print_window_header("Add A Escalation", "100%"); ?> <a href="<?php echo $link; ?> ?id=<?php echo $tempSource->getId(); ?> ">Return To <?php echo $title; ?> <?php echo $textTitle; ?> </a> <?php
if ($_POST['template_name'] == '' || $_POST['template_description'] == '') { $addError = 1; $error = "Fields shown are required and cannot be left blank."; } else { $template = new NagiosHostTemplate(); $template->setName($_POST['template_name']); $template->setDescription($_POST['template_description']); $template->save(); header("Location: host_template.php?id=" . $template->getId()); die; } } } } print_header("Host Template Editor"); print_window_header("Add Host Template", "100%"); ?> <form name="host_template_add_form" method="post" action="add_host_template.php"> <input type="hidden" name="request" value="add_host_template" /> <?php double_pane_form_window_start(); ?> <tr bgcolor="f0f0f0"> <td colspan="2" class="formcell"> <b>Template Name:</b><br /> <input type="text" size="40" name="template_name" value=""><br /> <?php echo $lilac->element_desc("template_name", "nagios_hosts_desc"); ?> <br /> <br />
$statusmap_layout_list[] = array("values" => "4", "text" => "Circular"); $statusmap_layout_list[] = array("values" => "5", "text" => "Circular (Marked Up)"); $statusmap_layout_list[] = array("values" => "6", "text" => "Circular (Marked Down)"); // Let's make the status wrl layout select list $statuswrl_layout_list[] = array("values" => "0", "text" => "User-Defined Coordinates"); $statuswrl_layout_list[] = array("values" => "1", "text" => "Depth Layers"); $statuswrl_layout_list[] = array("values" => "2", "text" => "Collapsed Tree"); $statuswrl_layout_list[] = array("values" => "3", "text" => "Balanced Tree"); $statuswrl_layout_list[] = array("values" => "4", "text" => "Circular"); if (!isset($_GET['section'])) { $_GET['section'] = 'paths'; } // Build subnavigation $subnav = array('paths' => 'Paths', 'authentication' => 'Authentication', 'status' => 'Status', 'sounds' => 'Sounds', 'other' => 'Other'); print_header("CGI Configuration File Editor"); print_window_header("Web Interface Configuration", "100%", "center"); print_subnav($subnav, $_GET['section'], "section"); if ($_GET['section'] == 'paths') { ?> <form name="cgi_path_config" method="post" action="cgi.php?section=paths"> <input type="hidden" name="request" value="update" /> <div class="formbox"> <b>Physical HTML Path:</b><br /> <input type="text" size="80" name="cgi_config[physical_html_path]" VALUE="<?php echo $cgiConfig->getPhysicalHtmlPath(); ?> "><br /> <?php echo $lilac->element_desc("physical_html_path", "nagios_cgi_desc"); ?> <br />
as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ // Lilac tools page require_once 'includes/config.inc'; print_header(); print_window_header("Tools", "100%"); ?> <ul> <li class="general icon-computer-add"><a href="autodiscovery.php">Auto Discovery</a><br /> Find new devices and add them to your Lilac Configuration</li> <li class="general icon-package"><a href="import.php">Importer</a><br /> Import a configuration from various sources using Import Engines.</li> <li class="general icon-server-go"><a href="export.php">Exporter</a><br /> Export the configuration to Nagios or other targets.</li> </ul> <br class="clear" /> <?php print_window_footer();
$resourceCfg->setUser23($_POST['resource_config']['user23']); $resourceCfg->setUser24($_POST['resource_config']['user24']); $resourceCfg->setUser25($_POST['resource_config']['user25']); $resourceCfg->setUser26($_POST['resource_config']['user26']); $resourceCfg->setUser27($_POST['resource_config']['user27']); $resourceCfg->setUser28($_POST['resource_config']['user28']); $resourceCfg->setUser29($_POST['resource_config']['user29']); $resourceCfg->setUser30($_POST['resource_config']['user30']); $resourceCfg->setUser31($_POST['resource_config']['user31']); $resourceCfg->setUser32($_POST['resource_config']['user31']); $resourceCfg->save(); $success = "Updated Resource Configuration."; } } print_header("Environment Resources"); print_window_header("Nagios Resources", "100%", "center"); ?> Nagios resources are used as macros when defining Nagios commands. Text strings which are commonly used are good examples of resources. These include passwords, file paths and usernames. <form name="resource_config[resource_config_form" method="post" action="resources.php"> <input type="hidden" name="request" value="update" /> <table width="100%" cellspacing="10" align="center" border="0"> <tr> <td width="50%" valign="top"> <b>$USER1$:</b> <input type="text" size="60" name="resource_config[user1]" value="<?php echo $resourceCfg->getUser1(); ?> "><br /> <br /> <b>$USER2$:</b> <input type="text" size="60" name="resource_config[user2]" value="<?php
foreach ($tempList as $period) { $period_list[] = array("timeperiod_id" => $period->getId(), "timeperiod_name" => $period->getName()); } $initialState_list = array(); $initialState_list[] = array('value' => 'o', 'label' => 'Up'); $initialState_list[] = array('value' => 'd', 'label' => 'Down'); $initialState_list[] = array('value' => 'u', 'label' => 'Unreachable'); // Build subnav $subnav = array('general' => 'General', 'inheritance' => 'Inheritance', 'checks' => 'Checks', 'flapping' => 'Flapping', 'logging' => 'Logging', 'notifications' => 'Notifications', 'services' => 'Services', 'groups' => 'Group Memberships', 'contacts' => 'Contacts', 'extended' => 'Extended Information', 'dependencies' => 'Dependencies', 'escalations' => 'Escalations'); if (isset($templateValues['check_command'])) { $subnav['checkcommand'] = 'Check Command Parameters'; } $subnav['autodiscovery'] = 'Auto-Discovery Filters'; print_header("Host Template Editor"); if (isset($_GET['id'])) { print_window_header("Template Info for " . $hostTemplate->getName(), "100%"); print_subnav($subnav, $_GET['section'], "section", $_SERVER['PHP_SELF'] . "?id=" . $_GET['id']); $host_template_icon_image = $path_config['image_root'] . "server.gif"; if ($_GET['section'] == 'general') { ?> <table width="100%" border="0"> <tr> <td width="100" align="center" valign="top"> <img src="<?php echo $host_template_icon_image; ?> " /> </td> <td valign="top"> <?php if (isset($_GET['edit'])) {
<?php } else { ?> <div class="statusmsg">No Contacts Exist</div> <?php } print_window_footer(); } if (isset($_GET['contact_add'])) { $lilac->get_contactgroup_list($tempList); $contactgroups_list = array(); foreach ($tempList as $contactgroup) { $contactgroups_list[] = array('contactgroup_id' => $contactgroup->getId(), 'contactgroup_name' => $contactgroup->getName()); } $contactgroups_list = array_merge(array(array('contactgroup_id' => 0, 'contactgroup_name' => "None")), $contactgroups_list); print_window_header("Add A Contact", "100%"); ?> <form name="command_form" method="post" action="contacts.php?contact_add=1"> <?php if (isset($_GET['edit'])) { ?> <input type="hidden" name="request" value="modify_contact" /> <input type="hidden" name="contact_id" value="<?php echo $_GET['contact_id']; ?> "> <?php } else { ?> <input type="hidden" name="request" value="add_contact" /> <?php
as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ // Lilac About Page require_once 'includes/config.inc'; print_header(); print_window_header("About Lilac Configurator", "100%"); ?> <p> <h2>Lilac Configurator <?php echo LILAC_VERSION; ?> </h2> Lilac Configurator is part of the Lilac Platform. The community site is available at <a href="http://www.lilacplatform.com">www.lilacplatform.com</a>. Lilac Configurator is a project developed by <a href="http://www.lilacnetworks.com">Lilac Networks</a>. </p> <p> <h2>Services & Support</h2> Lilac Networks can help support your implementation of Lilac & Nagios. For commercial support of your open source monitoring infrastructure, review our service offerings at <a href="http://www.lilacnetworks.com/services/">www.lilacnetworks.com</a>. For community support for Lilac Configurator, refer to the community site at <a href="http://www.lilacplatform.com">www.lilacplatform.com</a>. </p> <p> <h2>Statistics</h2> <table class="statistics">
// Field Error Checking if ($_POST['template_name'] == '' || $_POST['template_description'] == '') { $addError = 1; $error = "Fields shown are required and cannot be left blank."; } else { $template = new NagiosServiceTemplate(); $template->setName($_POST['template_name']); $template->setDescription($_POST['template_description']); $template->save(); header("Location: service_template.php?id=" . $template->getId()); } } } } print_header("Service Template Editor"); print_window_header("Add Service Template", "100%"); ?> <form name="service_template_add_form" method="post" action="add_service_template.php"> <input type="hidden" name="request" value="add_service_template" /> <?php double_pane_form_window_start(); ?> <tr bgcolor="f0f0f0"> <td colspan="2" class="formcell"> <b>Template Name:</b><br /> <input type="text" size="40" name="template_name" value=""><br /> <?php echo $lilac->element_desc("template_name", "nagios_services_desc"); ?> <br /> <br />