File: 1.12.0a/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: /* // LEGACY WAY 24: $NATS_Help=array(); 25: 26: function ha($id,$text) 27: { 28: global $NATS_Help; 29: $NATS_Help[strtoupper($id)]=$text; 30: } 31: 32: ha("FreeNATS","FreeNATS is a network monitoring package"); 33: 34: 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"); 35: ha("Node:Create","Create a new {node} with this {node:id|NodeID}"); 36: ha("Node:ID","The NodeID is a unique text name for a {node}. Maximum length 60 chars and only normal characters allowed."); 37: ha("Node:Enabled","The node is enabled for tests to be performed (and displayed in all applicable views)"); 38: ha("Node:AlertActive","Alerts will be generated for this node and alert actions performed if selected"); 39: ha("Node:PingTest","Do a ping (ICMP) test first before other tests - will always record results if enabled"); 40: 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"); 41: ha("Node:Master","Master Node to be Tested First"); 42: ha("MasterNode:Ping","Tests required to pass on the {Node:Master|master node} for this node to be tested"); 43: ha("Node:TestInterval","Interval (minutes) between tests on this node being carried out"); 44: ha("Nodeside","Enable support for node-side scripts to gather data from this node"); 45: ha("Node:CheckASAP","Schedule node for immediate text in next test cycle"); 46: 47: ha("UtilLinks","Links to services on remote note for system administration"); 48: 49: ha("Nodeside:Key","Key used to authenticate nodeside testing"); 50: ha("Nodeside:PullEnabled","Enable nodeside collection via http 'pull' from the node"); 51: ha("Nodeside:URL","URL to 'pull' nodeside data from on the node"); 52: ha("Nodeside:Interval","Interval between 'pulling' (polling) data from the node"); 53: ha("Nodeside:PushEnabled","Allow node to 'push' (post) data"); 54: ha("Nodeside:PushIP","Limit node 'push' to this specific IP address for security"); 55: 56: ha("Group","A group is a collection of one or more {node|nodes}. Note that nodes can be members of more than one group."); 57: ha("Group:Create","Create a new {group} with this name"); 58: 59: 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."); 60: ha("Test:Attempts","Number of times to attempt a test (will always try once). Defaults to 1 if zero or unset."); 61: ha("Test:Timeout","Timeout value for the test - alters the defaults or system-wide variable settings for the relevant test (seconds)"); 62: ha("Test:SimpleEvaluation","Use simple pass/fail evaluation (i.e. if a web test returns any data it passes else it fails)"); 63: ha("Test:Recorded","Record the results of this test for historic reports"); 64: ha("Test:Enabled","Perform the test or not (will update nothing if disabled)"); 65: ha("Test:Interval","Interval (minutes) between this test being performed. Will only ever be tested as quickly as the {Node:TestInterval|node interval} is set to"); 66: ha("Test:TestAlerts","Test will generate an alert on failure"); 67: 68: ha("History:Should","A rough calculation based on configured polling times (i.e. test interval or node interval) from the start to finish (or now if sooner)"); 69: 70: ha("View","A view is a custom set of nodes/groups/tests which can be used in a variety of ways"); 71: ha("View:Create","Creates a {view} of the specified name"); 72: ha("View:Public","The view can be seen by people not logged into FreeNATS"); 73: ha("View:Colons","If text status is selected for a view item a colon will be displayed before it"); 74: ha("View:Dashes","Display a dash before a test last run time where applicable"); 75: ha("View:TimeAgo","Use XX:XX ago or normal datetime for test details"); 76: ha("View:Columns","Display list-type elements in this number of columns (0 for off)"); 77: ha("View:Refresh","Send a http-equv to refresh the page after this many seconds (0 for off)"); 78: ha("View:UseColour","Use colour for status display as in normal FreeNATS display"); 79: ha("View:ShowDetail","Show details of the test/object(s) such as node tests"); 80: ha("View:TextStatus","Textual status such as passed, failed etc"); 81: 82: ha("Report","Reports show the %age of service availability in a specified period"); 83: 84: ha("Backup:Truncate","Clears tables first when restored back (recommended) otherwise duplicates may fail"); 85: 86: ha("Schedule","A schedule controls what times a node is tested and are managed through the admin page"); 87: ha("Schedule:DefaultAction","What will happen if no exceptions are matched (the opposite will happen if one is matched)"); 88: 89: ha("AlertAction","An alert action is performed when a node fails a test, they are configured through the admin page"); 90: 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)"); 91: ha("AAction:Decreases","The action is triggered when the level goes down to closed (or {AAction:Warnings|warnings} if set)"); 92: ha("AAction:Limit","Max times this action can run in any one day (0 = unlimited) to avoid flooding"); 93: ha("AAction:Counter","Number of times this action has run in the day shown - you can manually reset this here"); 94: 95: ha("Variable","System variables are used to control the system environment. To delete a variable just save it with a blank name."); 96: ha("Var:log.level","The system log level - 10 is everything, 0 is fatal only. 5-6-ish is probably a good balance."); 97: 98: ha("Var:api.public","The API interface is available to public users if 1 (also see {Var:api.key|api.key})"); 99: ha("Var:api.key","Require this key from public users as apikey when accessing the API ({Var:api.public|api.public} must be set)"); 100: 101: ha("Var:alert.body.footer","Footer to go at the end of system generated alerts"); 102: ha("Var:alert.body.header","Header to go at the start of system generated alerts"); 103: ha("Var:alert.subject.long","Subject for email alerts of long format"); 104: ha("Var:alert.subject.short","Subject for email alerts of short format"); 105: ha("Var:freenats.firstrun","System variable to indicate first use of FreeNATS"); 106: ha("Var:site.enable.tests","Enable testing"); 107: ha("Var:site.enable.web","Enable web interface"); 108: ha("Var:site.enable.tester","Enable Tester to Run"); 109: 110: ha("Var:site.graph.public","Graphs are available to public users for views etc if 1 (also see {Var:site.graph.key|site.graph.key})"); 111: ha("Var:site.graph.key","Require this key from public users as graphkey ({Var:site.graph.public|site.graph.public} must be set)"); 112: 113: ha("Var:site.enable.interactive","Must be set (1) to allow interactive web sessions (like this one)"); 114: ha("Var:site.popupmessage","If set (1) will show a popup message when saving changes etc"); 115: ha("Var:site.dtformat","Site-wide custom date time format (in PHP format) i.e. Y-m-d H:i:s"); 116: 117: ha("Var:site.text.failed","Text to show for a failed status (defaults to Failed if unset)"); 118: ha("Var:site.text.passed","Text to show for a passed status (defaults to Passed if unset)"); 119: ha("Var:site.text.untested","Text to show for untested items (defaults to Untested if unset)"); 120: ha("Var:site.text.warning","Text to show for a warning status (defaults to Warning if unset)"); 121: ha("Var:site.text.closed","Text to indicate alert closed (defaults to Alert Closed if unset)"); 122: ha("Var:site.include.events","Include *.php in the server/site/events directory if 1"); 123: ha("Var:site.include.tests","Include *.php in the server/site/tests directory if 1"); 124: ha("Var:site.enable.adminsql","Enables the admin SQL console if 1"); 125: ha("Var:site.links.newwindow","Opens {UtilLinks|utility links} in new window if 1"); 126: 127: ha("Var:site.monitor.popups","Opens a popup status window in live monitor unless set to 0"); 128: 129: ha("Var:mail.fromname","Textual from name to be used in SMTP mail (defaults to FreeNATS if unset)"); 130: ha("Var:mail.smtpserver","SMTP server to relay mail through (can be ; seperated list) uses internal mail() if unset or blank"); 131: ha("Var:mail.smtpusername","Username for SMTP AUTH (AUTH only used if username is set or provided)"); 132: ha("Var:mail.smtppassword","Password for SMTP AUTH"); 133: ha("Var:mail.smtphostname","Hostname for HELO in SMTP transactions (may be required for strict mail servers)"); 134: 135: ha("Var:test.icmp.timeout","Timeout in seconds to wait for an ICMP response before declaring a failure in seconds (default 10)"); 136: ha("Var:test.icmp.trytwice","Depreciated - replaced with {Var:test.icmp.attempts|test.icmp.attempts}"); 137: ha("Var:test.icmp.attempts","Number of times the main "require ping" test will attempt before failing (default 2)"); 138: ha("Var:test.icmp.returnms","If set (1) returns ping results in MilliSeconds (ms) (default 0)"); 139: ha("Var:test.http.timeout","Default timeout for HTTP/s streams used in web tests (uses system default if unset or <1)"); 140: ha("Var:test.imap.timeout","Default timeout for IMAP tests in seconds (uses environment default if unset or 0)"); 141: ha("Var:test.smtp.timeout","Default timeout for SMTP tests in seconds (uses 20 seconds if 0 or unset)"); 142: ha("Var:test.mysql.timeout","Default timeout for MySQL tests in seconds (uses environmental default if unset or 0)"); 143: ha("Var:test.spawndelay","Delay in seconds between node test threads being spawned by test-threaded.sh (no delay if 0 or unset), can be a decimal"); 144: ha("Var:test.interval","Delay in seconds between tests on a node (no delay if 0 or unset), can be a decimal"); 145: ha("Var:test.tcp.timeout","Default timeout for TCP tests (system default if 0 or unset) (seconds)"); 146: ha("Var:test.udp.timeout","Default timeout for UDP tests (system default if 0 or unset) (seconds)"); 147: 148: ha("Var:retain.alert","Days to retain alert records for (default 356 if 0 or unset). Retain forever with value -1."); 149: 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."); 150: ha("Var:retain.testrun","Days to retain test run records for (default 30 if 0 or unset). Retain forever with value -1."); 151: ha("Var:retain.syslog","Days to retain log entries for (default 30 if 0 or unset). Retain forever with value -1."); 152: 153: ha("Var:freenats.tracker","Participate in the automated feedback process - 1 for yes low level, 2 for detailed, 0 for disabled (default 0)"); 154: ha("Var:freenats.tracker.usid","Unique Site ID for FreeNATS tracker to anonymise data capture (only if {Var:freenats.tracker|freenats.tracker} set to 1"); 155: */ 156: function hdisp($id,$html=true) 157: { 158: global $NATS; 159: $t=$NATS->Lang->Item("help.".strtoupper($id)); 160: $o=""; 161: $mode="text"; 162: $linktext=false; 163: for ($a=0; $a164: { 165: $c=$t[$a]; 166: 167: if ($c=="{") // start of a link 168: { 169: $mode="link"; 170: $linktext=false; 171: $linkid=""; 172: $linktxt=""; 173: } 174: 175: else if ( ($mode=="link") && ($c=="|") ) // in a link and move into text mode... 176: { 177: $linktext=true; 178: } 179: 180: else if ( ($mode=="link") && ($c=="}") ) // in a link and the end of the link 181: { 182: if (!$linktext) $linktxt=$linkid; 183: if ($html) $o.=""; 184: $o.=$linktxt; 185: if ($html) $o.=""; 186: $mode="text"; 187: } 188: 189: else if ( $mode=="link" ) // in a link 190: { 191: if ($linktext) $linktxt.=$c; 192: else $linkid.=$c; 193: } 194: 195: else // in text 196: $o.=$c; 197: } 198: return $o; 199: } 200: 201: function hlink($id,$size=16) 202: { 203: global $NATS; 204: if (isset($NATS->Lang->items["help.".strtoupper($id)])) 205: return ""; 206: 207: return "Lang->Item("nohelp")." (".$id.")\">"; 208: } 209: 210: function ph($id,$size=16) 211: { 212: echo hlink($id,$size); 213: } 214: ?>