From 336c6c8a415603c772f97ccd63912d05209f3795 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 2 Jan 2015 13:27:02 +0100 Subject: initial --- docs/pingdomfetch.1 | 337 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 337 insertions(+) create mode 100644 docs/pingdomfetch.1 (limited to 'docs/pingdomfetch.1') diff --git a/docs/pingdomfetch.1 b/docs/pingdomfetch.1 new file mode 100644 index 0000000..fad010e --- /dev/null +++ b/docs/pingdomfetch.1 @@ -0,0 +1,337 @@ +.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "PINGDOMFETCH 1" +.TH PINGDOMFETCH 1 "2015-01-02" "pingdomfetch " "User Commands" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH "NAME" +pingdomfetch \- A small and humble tool to fetch availability stats from Pingdom and notify via E\-Mail +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +pingdomfetch + [\-\-all\-services] + [\-\-all\-tls] + [\-\-checkid <\s-1STRING\s0>] + [\-\-config <\s-1STRING\s0>] + [\-\-flatten <\s-1STRING\s0>] + [\-\-from <\s-1STRING\s0>] + [\-\-help] + [\-\-list\-services] + [\-\-list\-tls] + [\-\-notify] + [\-\-notify\-dummy] + [\-\-notify\-info] + [\-\-service <\s-1STRING\s0>] + [\-\-sort\-reverse] + [\-\-tls <\s-1STRING\s0>] + [\-\-to <\s-1STRING\s0>] + [\-\-verbose] + [\-\-version] +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +pingdomfetch is a tool to fetch availability stats from www.Pingdom.com and notifies the results via Email. You may use this script to extend it to do other things with the results as well. Pingdom already provides notification emailing. +.PP +Pingdomfetch also knows about 'so called' top level services (one top level service consists of several services). +.SH "CONFIG" +.IX Header "CONFIG" +.SS "Possible locations" +.IX Subsection "Possible locations" +Create a config at one of the following (or into several) location: +.PP +.Vb 5 +\& /etc/pingdomfetch.conf +\& ./pingdomfetch.conf +\& /etc/pingdomfetch.d/*.conf +\& ~/.pingdomfetch.conf +\& ~/.pingdomfetch.d/*.conf +.Ve +.PP +The last config file always overwrites the values configured in the previous config files. For this use the sample configuration file \fI/usr/share/pingdomfetch/examples/pingdomfetch.conf.sample\fR. Please read that sample configuration file carefully since it also describes all available config options. +.PP +It makes sense to have one global config \fI/etc/pingdomfetch.conf\fR containing all general configurations and for each top level service a separate config in \fI/etc/pingdomfetch.d/TLSNAME.conf\fR. +.SS "Top level services and services" +.IX Subsection "Top level services and services" +\fIConfigure a top level service:\fR +.IX Subsection "Configure a top level service:" +.PP +Each top level service consists of many services. Since Pingdom does not know about top level services but just about separate checks (which are separate services) pingdomfetch fetches the availability of all services and calculates an average availability of all services which belong to a top level service. +.PP +For each top level service you monitor via Pingdom you must create checks at Pingdom (manually). The check names should be of the form of +.PP +.Vb 1 +\& PROCOCOL://FQDN +.Ve +.PP +For example: +.PP +.Vb 1 +\& http://paul.buetow.org +\& +\& https://paul.buetow.org +.Ve +.PP +just in order to have it uniform to all the other Pingdom checks (there is no technical reason though). +.PP +Afterwards create a new file \fI/etc/pingdomfetch.d/TLSNAME.conf\fR (for example \fI/etc/pingdomfetch.d/buetoworg_tls.conf\fR) with the following content: +.PP +.Vb 3 +\& [tls.TLSNAME] +\& PROCOCOL1://FQDN1 +\& PROCOCOL2://FQDN2 +.Ve +.PP +to be specific it should be like this: +.PP +.Vb 3 +\& [tls.buetoworg_paul] +\& http://paul.buetow.org +\& https://paul.buetow.org +.Ve +.PP +The buetoworg_tls will be used by pingdomfetch to identify the top level service (e.g. using \-\-list\-tls) and can be freely chosen. +.PP +\fIFetch stats of the top level service:\fR +.IX Subsection "Fetch stats of the top level service:" +.PP +The command +.PP +.Vb 1 +\& pingdomfetch \-\-tls buetoworg_tls +.Ve +.PP +fetches the availability of both services from Pingdom and calculates the average availability which is the tls availability and prints out the results to stdout. +.PP +.Vb 1 +\& pingdomfetch \-\-from yesterday \-\-to yesterday \-\-flatten bod:eod \-\-all\-tls +.Ve +.PP +fetches the availability of yesteday of all configured tls. There are many other options available. +.PP +\fIService options\fR +.IX Subsection "Service options" +.PP +It is possible to configure special options for special services: +.PP +.Vb 3 +\& [tls.TLSNAME] +\& PROCOCOL1://FQDN1[=option1:value1[,option2:value2] +\& PROCOCOL2://FQDN2[=option1:value1[,option2:value2] +.Ve +.PP +The possible options are: +.IP "weight" 4 +.IX Item "weight" +If \s-1FQDN1\s0 has twice as much traffic as \s-1FQDN2\s0 it makes sense to increase its weight. The standard weight is 1. Its used to calculate the tls availability. +.IP "warning" 4 +.IX Item "warning" +This overwrites the global warning threshold. It makes sense to use to avoid staus mails just because one specific service is under the specified global warning threshold. +.PP +to be specific it should be like this: +.PP +.Vb 3 +\& [tls.buetoworg_tls.4352844] +\& http://paul.buetow.org=weight:2,warning:98 +\& https://paul.buetow.org=warning:100 +.Ve +.PP +and means that the availability of plain http will count twice as much as much. A warning mail will be sent only if the availability is less than 98% for http or less than 100% for https. +.SH "PINGDOMFETCH OPTIONS" +.IX Header "PINGDOMFETCH OPTIONS" +.IP "\-\-all\-services" 4 +.IX Item "--all-services" +Fetch availability of all services. +.IP "\-\-all\-tls" 4 +.IX Item "--all-tls" +Fetch availability of all top level services +.IP "\-\-checkid <\s-1NUMBER\s0>" 4 +.IX Item "--checkid " +Fetch availability of a specific check \s-1ID\s0. The check \s-1ID\s0 is the Pingdom check \s-1ID\s0. +.IP "\-\-config <\s-1STRING\s0>" 4 +.IX Item "--config " +Also read a specific config file. +.IP "\-\-flatten <\s-1STRING\s0>" 4 +.IX Item "--flatten " +Flatten the time interval to fetch availabilities for. E.g.: +.Sp +.Vb 1 +\& \-\-from yesterday \-\-to yesterday \-\-flatten bod:eod +.Ve +.Sp +fetches the availability from begin of day (yesterday) until the end of the day (yesterday). +.IP "\-\-from <\s-1STRING\s0>" 4 +.IX Item "--from " +Set time interval start time to fetch availabilities for. All formats supported by Time::ParseDate can be used. See http://search.cpan.org/~muir/Time\-modules\-2003.0211/lib/Time/ParseDate.pm . +.Sp +For example: +.Sp +.Vb 1 +\& \-\-from today +\& +\& \-\-from \*(Aq03.02.2013 12:34:56\*(Aq +\& +\& \-\-from \*(Aqlast week\*(Aq +.Ve +.IP "\-\-help" 4 +.IX Item "--help" +Print out a brief help. +.IP "\-\-list\-services" 4 +.IX Item "--list-services" +List all configured services. +.IP "\-\-list\-tls" 4 +.IX Item "--list-tls" +List all configured top level services. +.IP "\-\-notify" 4 +.IX Item "--notify" +Write a mail to all addresses specified in notify.email.to if at least one service or top level service is in state warning or critical. The warning threshold in % is warning.if.avail.is.less, the critical threshold in % is critical.if.avail.is.less. +.IP "\-\-notify\-dummy" 4 +.IX Item "--notify-dummy" +In conjunction with \-\-notify or \-\-notify\-info don't actually send mails but print them to stdout. +.IP "\-\-notify\-info" 4 +.IX Item "--notify-info" +Write a mail to all addresses specified in notify.info.mail.to regardless of warning and critical services and top level services. +.IP "\-\-service <\s-1STRING\s0>" 4 +.IX Item "--service " +Fetch availability of a specific service name. The service name can be taken from \-\-list\-services. +.IP "\-\-sort\-reverse" 4 +.IX Item "--sort-reverse" +Reverse the availability output list. Affects only status mails and stdout. +.IP "\-\-tls <\s-1STRING\s0>" 4 +.IX Item "--tls " +Fetch availability of a specific top level service. The top level service name can be taken from \-\-list\-tls. +.IP "\-\-to <\s-1STRING\s0>" 4 +.IX Item "--to " +Same as \-\-from, but specifies the end time to fetch availabilities for. +.IP "\-\-verbose" 4 +.IX Item "--verbose" +Turns on verbose mode. Enables some extra output to stdout. +.IP "\-\-version" 4 +.IX Item "--version" +Prints out the current version of pingdomfetch. +.SH "AUTHOR" +.IX Header "AUTHOR" +Paul Buetow \- -- cgit v1.2.3