File: 0.02.66a/server/base/help.inc.php (View as Code)

1: 2: /* ------------------------------------------------------------- 3: This file is part of FreeNATS 4: 5: FreeNATS is (C) Copyright 2008 PurplePixie Systems 6: 7: FreeNATS is free software: you can redistribute it and/or modify 8: it under the terms of the GNU General Public License as published by 9: the Free Software Foundation, either version 3 of the License, or 10: (at your option) any later version. 11: 12: FreeNATS is distributed in the hope that it will be useful, 13: but WITHOUT ANY WARRANTY; without even the implied warranty of 14: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15: GNU General Public License for more details. 16: 17: You should have received a copy of the GNU General Public License 18: along with FreeNATS. If not, see www.gnu.org/licenses 19: 20: For more information see www.purplepixie.org/freenats 21: -------------------------------------------------------------- */ 22: 23: $NATS_Help=array(); 24: 25: function ha($id,$text) 26: { 27: global $NATS_Help; 28: $NATS_Help[strtoupper($id)]=$text; 29: } 30: 31: ha("FreeNATS","FreeNATS is a network monitoring package"); 32: 33: ha("Node","A node is a system or device which you are monitoring. Note that nodes can have tests pointing to different physical devices and vice-versa"); 34: ha("Node:Create","Create a new {node} with this {node:id|NodeID}"); 35: ha("Node:ID","The NodeID is a unique text name for a {node}. Maximum length 60 chars and only normal characters allowed."); 36: ha("Node:Enabled","The node is enabled for tests to be performed (and displayed in all applicable views)"); 37: ha("Node:AlertActive","Alerts will be generated for this node and alert actions performed if selected"); 38: ha("Node:PingTest","Do a ping (ICMP) test first before other tests - will always record results if enabled"); 39: ha("Node:RequirePing","Require the ping to pass for other tests to even be tried - will always fail if {Node:PingTest|ping test} is disabled"); 40: 41: ha("Group","A group is a collection of one or more {node|nodes}. Note that nodes can be members of more than one group."); 42: ha("Group:Create","Create a new {group} with this name"); 43: 44: ha("Test:Name","A custom name can be assigned to the test for use in displays and alerts. If blank an automated name will be generated."); 45: ha("Test:Attempts","Number of times to attempt a test (will always try once). Defaults to 1 if zero or unset."); 46: ha("Test:Timeout","Timeout value for the test - alters the defaults or system-wide variable settings for the relevant test (seconds)"); 47: ha("Test:SimpleEvaluation","Use simple pass/fail evaluation (i.e. if a web test returns any data it passes else it fails)"); 48: ha("Test:Recorded","Record the results of this test for historic reports"); 49: 50: ha("History:Should","A rough calculation based on 5 minute polling from the start to finish (or now if sooner)"); 51: 52: ha("AAction:Warnings","The action is triggered for warning level events as well as failures (including downgrading from failure to warning if {AAction:Decreases|decreases} is set)"); 53: ha("AAction:Decreases","The action is triggered when the level goes down to closed (or {AAction:Warnings|warnings} if set)"); 54: ha("AAction:Limit","Max times this action can run in any one day (0 = unlimited) to avoid flooding"); 55: ha("AAction:Counter","Number of times this action has run in the day shown - you can manually reset this here"); 56: 57: ha("Variable","System variables are used to control the system environment. To delete a variable just save it with a blank name."); 58: ha("Var:log.level","The system log level - 10 is everything, 0 is fatal only. 5-6-ish is probably a good balance."); 59: 60: ha("Var:site.enable.interactive","Must be set (1) to allow interactive web sessions (like this one)"); 61: ha("Var:site.popupmessage","If set (1) will show a popup message when saving changes etc"); 62: 63: ha("Var:test.icmp.timeout","Timeout in seconds to wait for an ICMP response before declaring a failure in seconds (default 10)"); 64: ha("Var:test.icmp.trytwice","Depreciated - replaced with {Var:test.icmp.attempts|test.icmp.attempts}"); 65: ha("Var:test.icmp.attempts","Number of times the main "require ping" test will attempt before failing (default 2)"); 66: ha("Var:test.http.timeout","Default timeout for HTTP/s streams used in web tests (uses system default if unset or <1)"); 67: 68: ha("Var:retain.alert","Days to retain alert records for (default 356 if 0 or unset). Retain forever with value -1."); 69: ha("Var:retain.record","Days to retain test result records for use in history and graphs (default 356 if 0 or unsert). Retain forever with value -1."); 70: ha("Var:retain.testrun","Days to retain test run records for (default 30 if 0 or unset). Retain forever with value -1."); 71: ha("Var:retain.syslog","Days to retain log entries for (default 30 if 0 or unset). Retain forever with value -1."); 72: 73: ha("Var:freenats.tracker","Participate in the automated feedback process - 1 for yes low level, 2 for detailed, 0 for disabled (default 0)"); 74: function hdisp($id,$html=true) 75: { 76: global $NATS_Help; 77: if (!isset($NATS_Help[strtoupper($id)])) return ""; 78: $t=$NATS_Help[strtoupper($id)]; 79: $o=""; 80: $mode="text"; 81: $linktext=false; 82: for ($a=0; $a 83: { 84: $c=$t[$a]; 85: 86: if ($c=="{") // start of a link 87: { 88: $mode="link"; 89: $linktext=false; 90: $linkid=""; 91: $linktxt=""; 92: } 93: 94: else if ( ($mode=="link") && ($c=="|") ) // in a link and move into text mode... 95: { 96: $linktext=true; 97: } 98: 99: else if ( ($mode=="link") && ($c=="}") ) // in a link and the end of the link 100: { 101: if (!$linktext) $linktxt=$linkid; 102: if ($html) $o.=""; 103: $o.=$linktxt; 104: if ($html) $o.=""; 105: $mode="text"; 106: } 107: 108: else if ( $mode=="link" ) // in a link 109: { 110: if ($linktext) $linktxt.=$c; 111: else $linkid.=$c; 112: } 113: 114: else // in text 115: $o.=$c; 116: } 117: return $o; 118: } 119: 120: function hlink($id,$size=16) 121: { 122: global $NATS_Help; 123: if (isset($NATS_Help[strtoupper($id)])) 124: return ""; 125: 126: return ""; 127: } 128: 129: function ph($id,$size=16) 130: { 131: echo hlink($id,$size); 132: } 133: ?>