Projet

Général

Profil

Révision 26181ead

ID26181ead335223b439948b3b7436d3c29a757cda
Parent ff68f641
Enfant bc1e78ae

Ajouté par Thomas Riccardi il y a plus de 7 ans

sshd_log: POD style documentation

Voir les différences:

plugins/ssh/sshd_log
1 1
#!/bin/sh
2
#
3
# Plugin to monitor auth.log or journald for sshd server events.
4
#
5
# Require read permitions for $LOG or journald
6
#  (set in /etc/munin/plugin-conf.d/munin-node on debian)
7
#
8
# $Log$
9
# Revision 2.0  2016/11/11 15:42:00  Thomas Riccardi
10
# Revision 1.2  2010/03/19 15:03:00  pmoranga
11
# Revision 1.1  2009/04/26 23:28:00  ckujau
12
# Revision 1.0  2009/04/22 22:00:00  zlati
13
# Initial revision
14
#
15
# Parameters:
2

  
3
: <<=cut
4

  
5
=head1 NAME
6

  
7
sshd_log - Munin plugin to monitor auth.log or journald for sshd
8
           server events.
9

  
10
=head1 CONFIGURATION
11

  
12
This plugin requires read permission for the logfile or journald.
13

  
14
On busy servers you can change value type to COUNTER and set min to 0
15
to avoid minus peaks at logrotate.
16

  
17
The following environment variables are used by this plugin:
18

  
19
 logfile  - path to the auth log file, or "journald" to use journald.
20
            default: /var/log/secure
21
 category - graph category. default: system
22

  
23
 journalctlargs - space separated list of arguments to pass to
24
                  journalctl to get the sshd logs.
25
                  default: _COMM=sshd
26

  
27
If the "logfile" environment variable is set to "journald" the sshd
28
logs are read from journald, filtering on program "sshd". The filtering
29
may be changed using "journalctlarg".
30

  
31

  
32
Config examples for /etc/munin/plugin-conf.d/munin-node:
33

  
34
  [sshd_log]
35
      user root
36
      group root
37
      env.logfile /var/log/messages
38
      env.category users
39

  
40
Config example with journald:
41

  
42
  [sshd_log]
43
      group systemd-journal
44
      env.logfile journald
45

  
46
Config example with journald on the sshd.service unit only:
47

  
48
  [sshd_log]
49
      group systemd-journal
50
      env.logfile journald
51
      env.journalctlarg --unit=sshd.service
52

  
53
=head1 MAGIC MARKERS
54

  
55
  #%# family=auto
56
  #%# capabilities=autoconf
57

  
58
=head1 AUTHOR
59

  
60
Revision 2.0  2016/11/11 15:42:00  Thomas Riccardi
61
Revision 1.2  2010/03/19 15:03:00  pmoranga
62
Revision 1.1  2009/04/26 23:28:00  ckujau
63
Revision 1.0  2009/04/22 22:00:00  zlati
64

  
65
=cut
66

  
67

  
68
# Script parameters:
16 69
#
17 70
#       config   (required)
18 71
#       autoconf (optional - used by munin-config)
19
#
20
# Magick markers (optional):
21
#%# family=auto
22
#%# capabilities=autoconf
23

  
24
# config example for /etc/munin/plugin-conf.d/munin-node
25
#[sshd_log]
26
#user root
27
#group root
28
#env.logfile /var/log/messages
29
#env.category users
30
#
31
# config example with journald
32
#[sshd_log]
33
#group systemd-journal
34
#env.logfile journald
35
#
36
# config example with journald on the sshd.service unit only
37
#[sshd_log]
38
#group systemd-journal
39
#env.logfile journald
40
#env.journalctlarg --unit=sshd.service
41
#
72

  
42 73

  
43 74
LOG=${logfile:-/var/log/secure}
44 75
JOURNALCTL_ARG=${journalctlarg:-_COMM=sshd}

Formats disponibles : Unified diff