{"id":3324,"date":"2014-10-25T00:34:38","date_gmt":"2014-10-25T00:34:38","guid":{"rendered":"http:\/\/www.fingerpost.co.uk\/wp\/programme-documentation\/ipmon\/"},"modified":"2014-10-25T00:34:38","modified_gmt":"2014-10-25T00:34:38","slug":"ipmon","status":"publish","type":"page","link":"https:\/\/www.fingerpost.co.uk\/wp\/programme-documentation\/ipmon\/","title":{"rendered":"ipmon  (Sat Oct 25 2014 01:31:01)"},"content":{"rendered":"<pre>\nipmon \n\nIPMON monitors when traffic was last logged on this system plus it can check\nfor events such as program failures and network problems.\n\nIt watches the Item Log, log\/ALL, and displays those events specified in its\nparameter table - generally tables\/sys\/MONITOR.\n\nThe syntax of the parameter file MONITOR is :\n\t; comment\n\t; For any embedded spaces, pls remember to use s \n\tsbanner:--DelaytServicetFilen\n\tsnothing:** Nothing in the Log **\n\n\tfrom:iproute\tstring:AP\tignore:PAP\ttime:15\tlog:\n\tfrom:iproute\tstring:REUTER\ttime:5:BEEP\n\tfrom:iproute\tstring:EXTEL\ttime:10:tracemsg days:1-6 hours:9.00-21:30\n\t; do not check timeouts on INFO ...\n\tfrom:iproute\tstring:INFO\tshow:&quot;QD  for SN&quot;\n\tfrom:iproute\tstring:AFP\ttitle:&quot;Agence France Press&quot;\n\n\tfbanner:--FlagtMessagen\n\tfnothing:Nothing in the Log\n\n\tflag:x:Error\n\tflag:s:Stop\/Start\n\n\t; create a file every time this is run and send it to destination statusMON\n\t; this destination MUST be in the sys\/USERS parameter file\n\tfile:statusMON\n\n\textra-fiphdr: (optional) FipHeader information for the output file.\n\n\t; run a script every cycle\n\tscript: (name of script)\n\n\t; run a script every time you get an error or a certain flag\n\t; there can be 10 flags tracked\n\tallerrors: (scriptname)\n\tallforflag: (flag) : (scriptname)\n\t\tallforflag:u:\/fip\/local\/zippyoff\n\n\t; Run a specfic script every cycle if timed out\n\t; (default is on transition only - ie when times out and when recovers)\n\teverytime:\n\n\terror-message; (FipSeq)\n\tno-traffic-message: (FipSeq)\n\t\treplacement text for the log message if a service errors.\n\t\tFipHdrs\tET - holds the title or searchname\n\t\t\tES - number of seconds since the last item\n\t\t\tEM - number of mins since the last item\n\t\teg\terror-message:Service ET has failed (EM mins since the last one)\n\t\t\tno-traffic-message:No Traffic has arrived on Service ET today\n\nIn this example, we first set up the banners for scans (sbanner) and flags\n(fbanner), then setup default warning messages if nothing is found for that\nscan or flag (snothing and fnothing).\n\nFor scans we look for items that program 'iproute' wrote. A search string,\nususally the agency but it could be any valid string is specified. Optionally a\ntimeout value in minutes can be applied. An optional 'ignore' string can be\nspecified to ignore certain lines.\n\nSome strings like 'AP' appear as part words in keywords etc. So to be sure you\nget only the AP service use :\n\tservice:&quot;AP\t&quot;\nwhere a tab is after the AP and all enclosed in double quotes\n\nIf this time is exceeded, the line is flagged so. The program can optionally\nbeep or run a script ie :\n\t\ttime:20:BEEP\n\tor\ttime:20:script\n\twhich tries to run a script with parameters :\n\t\tscript srchstring minutes-since itemtext\n\tor\tscript srchstring -1 NothingMessage\n\nThis timeout can be restricted to days of the week and\/or hours of the day :\nFor days, either specify each day with a comma between or a dash for a range\n(no embedded spaces pls). The day numbers are 1=sunday, 2=monday etc.\n\tdays:1,2,3\tfor Sun, Mon and Tue\nor\tdays:2-6\tfor weekdays\n\nFor Hours of the day :\n\thours:(from)-(to)\twhere from and to are 24hour clock\n\thours:12:20-22:00\n\nTo log the problems in the Fip Item Log, use the 'log:' subparameter.\n\nNormally the rest of the line is printed but there may be a case where you want\nto extract information from the line and only use one or two bits of it. This\nis especially true when the complete FIP filename is provided eg :\nWed Feb 16 15:53:55 ipspool !i :\n#ZI#SC:PSC#SU:PSC#FBIN#SN:MER2#DU:mono#SA:PUB03  \nTo run this script every cycle if timed out rather than (default) on transition\nonly - ie when times out and when recovers - use the 'everytime:' parameter;\n\teverytime:\n\nUse show to extract the information you require . If spaces are to be embedded,\nuse double quotes before and after the string.\n\t\tshow:&quot;DU for SN&quot;\ngive\t\tmono for MER2\n\nNormally the second column is the search string but this can be replaced by the\nTitle keyword.\n\nFor flags (meaning the Item Log flags such as !x for failures, !i for incomings\netc) we specify just the first letter plus a description field.\n\nFor 'allerrors',  the script will be presented with four parameters :\nIf the error was :\n\tSat Oct 11 17:52:16 ipbdcast (9911)  !x : Recv Error   131\n\n\tparameter1\tdate\/time\tSat Oct 11 17:52:16\n\tparameter2\tprogram\t\tipbdcast\n\tparameter3\tsystem\/port\t(9991)\n\tparameter4\tmessage\t\tRecv Error   131\nNote that 'allerrors' works for all NEW traffic only. So if 'ipmon' is stopped\nand restarted, any intermediate errors are ignored. This can be reversed by the\n-A input switch to flag ALL errors in the log file, not just the new ones.\n\n'allforflag' works exactly the same except there are 6 parameters\n\tparameter 1\t'ERROR'\n\tparameter 2\tthe flag\n\tparameter 3\tdate\/time as above etc etc\n\nInput Options are (all optional) :\n\t-1 : single run then stop\t\t\t\tdefault: continuous running\nor\n\t-A : run the 'allerrors' script for all &quot;!x&quot; on restart. default: only new\nones\n\t-b : do NOT beep if timed out\n\t\tdefault: beep if the BEEP parameter has been specified.\n\t-d : daemon\/service flag. Run in background to\t  default: no\n\t\tgenerate show files for IPSVCE.\n\t\tThis leaves the file in x\/MON.(name of parameter file)\n\t\tforced uppercase.\n\t-L : Log file in \/fip\/log \t\t\t\tdefault: \/fip\/log\/ALL\n\t\tUse this for testing or looking at Syndication logs etc\n\t-o : output folder\n\t\tdefault: \/fip\/x for -d daemon\/service flag\n\t\tdefault: \/fip\/spool\/2go for file:destination\n\t\t\tNote this is only used if there is a 'file' parameter\n\t\tdefault: none for normal running as the file is displayed and not saved\n\t-O : Start scan on this number of seconds off the minute. default:23\n\t-t : sleep time in seconds between scans\t\tdefault: 60 secs\n\t-z : use a different parameter file in tables\/sys \tdefault: MONITOR\n\t\t-f and -z are the same\n\t-v : print version number and exit\n\nIf 'ipmon' is being started by 'local\/rc.fip' on reboot there is every chance\nthere will be no shell and no environment set - and in particular, no PATH. So\nthe full pathname of the script must be specified in the parameter file.\n\nVersion Control\n;015t6\t12oct97 added allerrors\n\t;a 28apr98 WINNT inputs now work\n\t;c 04nov99 added days and hours\n\t;d 20nov99 added -A\n\t;e\/f\/g 27nov00 added -L\n\t;h-i 12apr02 added log\n\t;j 05mar04 no of scans from 200 to 300\n\t;k add extraFipheader\n\t;l-n 06apr06 added -o for output folder\n\t;o 01may07 allowed hours to go over midnight\n\t;p-t3 21may07 added script for flag: and allforflag:\n\t\t;1 added -1 single ;2 day bug - was mday ;3 bugette with allerrors ;4-5\n21may12 -O added\n\t\t;6 15jul13 allow script names with _ and - in program\n\n\n(copyright) 2014 and previous years FingerPost Ltd.\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>ipmon IPMON monitors when traffic was last logged on this system plus it can check for events such as program failures and network problems. It watches the Item Log, log\/ALL, and displays those events specified in its parameter table &#8211; generally tables\/sys\/MONITOR. The syntax of the parameter file MONITOR is : ; comment ; For [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"parent":495,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"page-templates\/full-width.php","meta":[],"_links":{"self":[{"href":"https:\/\/www.fingerpost.co.uk\/wp\/wp-json\/wp\/v2\/pages\/3324"}],"collection":[{"href":"https:\/\/www.fingerpost.co.uk\/wp\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.fingerpost.co.uk\/wp\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.fingerpost.co.uk\/wp\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fingerpost.co.uk\/wp\/wp-json\/wp\/v2\/comments?post=3324"}],"version-history":[{"count":0,"href":"https:\/\/www.fingerpost.co.uk\/wp\/wp-json\/wp\/v2\/pages\/3324\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/www.fingerpost.co.uk\/wp\/wp-json\/wp\/v2\/pages\/495"}],"wp:attachment":[{"href":"https:\/\/www.fingerpost.co.uk\/wp\/wp-json\/wp\/v2\/media?parent=3324"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}