GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Update multiple plugins to latest stable UI · ddb4github/plugin_syslog@a6d66bd

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • config.php
  • database.php
  • functions.php
  • include
    • index.php
    • top_syslog_header.php
  • setup.php
  • syslog.css
  • syslog.php
  • syslog_alerts.php
  • syslog_batch_transfer.php
  • syslog_counter.php
  • syslog_fix_warning.php
  • syslog_process.php
  • syslog_removal.php
  • syslog_reports.php
  • syslog_upgrade.php
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎config.php‎

Copy file name to clipboardExpand all lines: config.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/*
33
+-------------------------------------------------------------------------+
4-
| Copyright (C) 2007-2013 The Cacti Group |
4+
| Copyright (C) 2007-2014 The Cacti Group |
55
| |
66
| This program is free software; you can redistribute it and/or |
77
| modify it under the terms of the GNU General Public License |
Collapse file

‎database.php‎

Copy file name to clipboardExpand all lines: database.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/*
33
+-------------------------------------------------------------------------+
4-
| Copyright (C) 2007-2013 The Cacti Group |
4+
| Copyright (C) 2007-2014 The Cacti Group |
55
| |
66
| This program is free software; you can redistribute it and/or |
77
| modify it under the terms of the GNU General Public License |
Collapse file

‎functions.php‎

Copy file name to clipboardExpand all lines: functions.php
+10-20Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1616
| GNU General Public License for more details. |
1717
+-------------------------------------------------------------------------+
18-
| h.aloe: a syslog monitoring addon for Ian Berry's Cacti |
18+
| h.aloe: a syslog monitoring addon for Ian Berry's Cacti |
1919
+-------------------------------------------------------------------------+
2020
| Originally released as aloe by: sidewinder at shitworks.com |
2121
| Modified by: Harlequin <[email protected]> |
@@ -210,8 +210,11 @@ function syslog_remove_items($table, $uniqueID) {
210210

211211
include(dirname(__FILE__) . '/config.php');
212212

213-
/* REMOVE ALL THE THINGS WE DONT WANT TO SEE */
214-
$rows = syslog_db_fetch_assoc("SELECT * FROM `" . $syslogdb_default . "`.`syslog_remove` WHERE enabled='on'");
213+
if ($table == 'syslog') {
214+
$rows = syslog_db_fetch_assoc("SELECT * FROM `" . $syslogdb_default . "`.`syslog_remove` WHERE enabled='on' AND id=$uniqueID");
215+
}else{
216+
$rows = syslog_db_fetch_assoc("SELECT * FROM `" . $syslogdb_default . "`.`syslog_remove` WHERE enabled='on'");
217+
}
215218

216219
syslog_debug("Found " . sizeof($rows) . ", Removal Rule(s) to process");
217220

@@ -448,7 +451,7 @@ function syslog_remove_items($table, $uniqueID) {
448451
$debugm = '';
449452
/* process the removal rule first */
450453
if ($sql1 != '') {
451-
/* move rows first */
454+
/* now delete the remainder that match */
452455
syslog_db_execute($sql1);
453456
}
454457

@@ -457,8 +460,8 @@ function syslog_remove_items($table, $uniqueID) {
457460
$removed += $syslog_cnn->Affected_Rows();
458461
$debugm = "Deleted " . $removed . ", ";
459462
if ($sql1 != '') {
460-
$debugm = "Moved " . $messages_moved . ", ";
461463
$xferred += $syslog_cnn->Affected_Rows();
464+
$debugm = "Moved " . $xferred . ", ";
462465
}
463466

464467
syslog_debug($debugm . " Message" . ($syslog_cnn->Affected_rows() == 1 ? "" : "s" ) .
@@ -631,7 +634,7 @@ function syslog_debug($message) {
631634
}
632635
}
633636

634-
function syslog_log_alert($alert_id, $alert_name, $severity, $msg, $count = 1, $html, $hosts) {
637+
function syslog_log_alert($alert_id, $alert_name, $severity, $msg, $count = 1, $html) {
635638
global $config, $severities;
636639

637640
include(dirname(__FILE__) . "/config.php");
@@ -650,10 +653,6 @@ function syslog_log_alert($alert_id, $alert_name, $severity, $msg, $count = 1, $
650653

651654
$id = 0;
652655
$id = syslog_sql_save($save, "`" . $syslogdb_default . "`.`syslog_logs`", "seq");
653-
$save["seq"]=$id;
654-
$save["alert_name"]= $alert_name;
655-
//insert trigged record into grid_host_alarm
656-
api_plugin_hook_function('syslog_update_hostsalarm', $save);
657656

658657
cacti_log("WARNING: The Syslog Alert '$alert_name' with Severity '" . $severities[$severity] . "', has been Triggered on Host '" . $msg["host"] . "', and Sequence '$id'", false, "SYSLOG");
659658

@@ -672,14 +671,6 @@ function syslog_log_alert($alert_id, $alert_name, $severity, $msg, $count = 1, $
672671

673672
$id = 0;
674673
$id = syslog_sql_save($save, "`" . $syslogdb_default . "`.`syslog_logs`", "seq");
675-
$save["seq"]=$id;
676-
$save["alert_name"]=$alert_name;
677-
678-
foreach($hosts as $host){
679-
680-
$save["host"] = $host;
681-
api_plugin_hook_function('syslog_update_hostsalarm', $save);
682-
}
683674

684675
cacti_log("WARNING: The Syslog Intance Alert '$alert_name' with Severity '" . $severities[$severity] . "', has been Triggered, Count was '" . $count . "', and Sequence '$id'", false, "SYSLOG");
685676

@@ -694,7 +685,6 @@ function syslog_manage_items($from_table, $to_table) {
694685

695686
/* Select filters to work on */
696687
$rows = syslog_db_fetch_assoc("SELECT * FROM `" . $syslogdb_default . "`.`syslog_remove` WHERE enabled='on'");
697-
//$rows = syslog_db_fetch_assoc("SELECT * FROM `" . $syslogdb_default . "`.`syslog_remove` WHERE enabled='on' AND message like 'last message repeated %'");
698688

699689
syslog_debug("Found " . sizeof($rows) . ", Removal Rule(s)" . " to process");
700690

@@ -709,7 +699,7 @@ function syslog_manage_items($from_table, $to_table) {
709699
$sql_sel = "";
710700
$sql_dlt = "";
711701

712-
if ($remove['type'] == 'facility') {
702+
if ($remove['type'] == 'facility') {
713703
if ($remove['method'] != 'del') {
714704
$sql_sel = "SELECT seq
715705
FROM `" . $syslogdb_default . "`. $from_table
Collapse file

‎include/index.php‎

Copy file name to clipboardExpand all lines: include/index.php
-3Lines changed: 0 additions & 3 deletions
This file was deleted.
Collapse file

‎include/top_syslog_header.php‎

Copy file name to clipboardExpand all lines: include/top_syslog_header.php
-135Lines changed: 0 additions & 135 deletions
This file was deleted.
Collapse file

‎setup.php‎

Copy file name to clipboardExpand all lines: setup.php
+11-7Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ function syslog_setup_table_new($options) {
817817
function syslog_version () {
818818
return array(
819819
'name' => 'syslog',
820-
'version' => '1.3',
820+
'version' => '1.4',
821821
'longname' => 'Syslog Monitoring',
822822
'author' => 'Jimmy Conner',
823823
'homepage' => 'http://cactiusers.org',
@@ -848,7 +848,7 @@ function syslog_poller_bottom() {
848848
function syslog_install_advisor($syslog_exists, $db_version) {
849849
global $config, $colors, $syslog_retentions;
850850

851-
include($config["include_path"] . "/top_header.php");
851+
top_header();
852852

853853
syslog_config_arrays();
854854

@@ -916,7 +916,7 @@ function syslog_install_advisor($syslog_exists, $db_version) {
916916

917917
print "<table align='center' width='80%'><tr><td>\n";
918918
html_start_box("<strong>Syslog " . $type . " Advisor</strong>", "100%", $colors["header"], "3", "center", "");
919-
print "<tr><td bgcolor='#FFFFFF'>\n";
919+
print "<tr><td>\n";
920920
if ($syslog_exists) {
921921
print "<h2 style='color:red;'>WARNING: Syslog Upgrade is Time Consuming!!!</h2>\n";
922922
print "<p>The upgrade of the 'main' syslog table can be a very time consuming process. As such, it is recommended
@@ -950,6 +950,8 @@ function syslog_install_advisor($syslog_exists, $db_version) {
950950
html_end_box();
951951
syslog_confirm_button("install", "plugins.php", $syslog_exists);
952952
print "</td></tr></table>\n";
953+
954+
bottom_footer();
953955
exit;
954956
}
955957

@@ -962,7 +964,7 @@ function syslog_uninstall_advisor() {
962964

963965
$syslog_exists = sizeof(syslog_db_fetch_row("SHOW TABLES FROM `" . $syslogdb_default . "` LIKE 'syslog'"));
964966

965-
include($config["include_path"] . "/top_header.php");
967+
top_header();
966968

967969
$fields_syslog_update = array(
968970
"uninstall_method" => array(
@@ -993,6 +995,8 @@ function syslog_uninstall_advisor() {
993995
html_end_box();
994996
syslog_confirm_button("uninstall", "plugins.php", $syslog_exists);
995997
print "</td></tr></table>\n";
998+
999+
bottom_footer();
9961000
exit;
9971001
}
9981002

@@ -1008,9 +1012,9 @@ function syslog_confirm_button($action, $cancel_url, $syslog_exists) {
10081012
}
10091013

10101014
?>
1011-
<table align='center' width='100%' style='background-color: #ffffff; border: 1px solid #bbbbbb;'>
1015+
<table align='center' width='100%'>
10121016
<tr>
1013-
<td bgcolor='#F5F5F5' align='right'>
1017+
<td class='saveRow' align='right'>
10141018
<input name='<?php print ($syslog_exists ? 'return':'cancel')?>' type='submit' value='Cancel'>
10151019
<input name='<?php print $action;?>' type='submit' value='<?php print $value;?>'>
10161020
</td>
@@ -1499,7 +1503,7 @@ function syslog_utilities_list() {
14991503

15001504
html_header(array('Syslog Utilities'), 2); ?>
15011505

1502-
<tr bgcolor='#<?php print $colors['form_alternate1'];?>'>
1506+
<tr class='even'>
15031507
<td class='textArea'>
15041508
<a href='utilities.php?action=purge_syslog_hosts'>Purge Syslog Hosts</a>
15051509
</td>
Collapse file

‎syslog.css‎

Copy file name to clipboardExpand all lines: syslog.css
+16-8Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,25 @@
55

66
.table {
77
align:center;
8-
border-color:#00438c;
9-
border-style:solid;
10-
border-width:2px;
118
width:100%;
129
}
1310

11+
.table tr th.th {
12+
background: rgba(138,179,105,1);
13+
background: -moz-linear-gradient(top, rgba(138,179,105,1) 0%, rgba(63,117,15,1) 100%);
14+
background: -webkit-gradient(left top, left bottom, color-stop(0%, rgba(138,179,105,1)), color-stop(100%, rgba(63,117,15,1)));
15+
background: -webkit-linear-gradient(top, rgba(138,179,105,1) 0%, rgba(63,117,15,1) 100%);
16+
background: -o-linear-gradient(top, rgba(138,179,105,1) 0%, rgba(63,117,15,1) 100%);
17+
background: -ms-linear-gradient(top, rgba(138,179,105,1) 0%, rgba(63,117,15,1) 100%);
18+
background: linear-gradient(to bottom, rgba(138,179,105,1) 0%, rgba(63,117,15,1) 100%);
19+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#8ab369', endColorstr='#3f750f', GradientType=0 );
20+
}
21+
1422
.th {
15-
background-color:#00438c;
16-
color:white;
17-
font-family:Verdana,Arial,Helvetica,sans-serif;
18-
text-align:left;
23+
color: snow;
24+
font-weight:bold;
25+
vertical-align:bottom;
26+
text-align:left;
1927
}
2028

2129
.td {
@@ -34,4 +42,4 @@
3442
text-align:left;
3543
font-family:Verdana,Arial,Helvetica,sans-serif;
3644
font-size:12pt;
37-
}
45+
}

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.