419
419
Historically, the Net-SNMP agent has reported such file systems
420
420
as 'Fixed Disks', and this is still the default behaviour.
421
421
Setting this directive to '1' reports such file systems as
422
'Network Disks', as required by the Host Resources MIB.
422
\'Network Disks', as required by the Host Resources MIB.
423
423
.SS Process Monitoring
424
424
The \fChrSWRun\fR group of the Host Resources MIB provides
425
425
information about individual processes running on the local system.
467
467
.IP "disk PATH [ MINSPACE | MINPERCENT% ]"
468
468
monitors the disk mounted at PATH for available disk space.
470
The minimum threshold can either be specified in Kb (MINSPACE) or
470
The minimum threshold can either be specified in kB (MINSPACE) or
471
471
as a percentage of the total disk (MINPERCENT% with a '%' character),
472
defaulting to 100Kb if neither are specified.
472
defaulting to 100kB if neither are specified.
473
473
If the free disk space falls below this threshold,
474
474
then the corresponding \fCdskErrorFlag\fR instance will be
475
475
set to 1, and a suitable description message reported via the
539
539
even if the \fIload\fR directive is not present.
541
541
monitors the amount of swap space available on the local system.
542
If this falls below the specified threshold (MIN Kb),
542
If this falls below the specified threshold (MIN kB),
543
543
then the \fImemErrorSwap\fR object will be set to 1,
544
544
and a suitable description message reported via \fImemSwapErrorMsg\fR.
547
547
This situation will \fBnot\fR automatically trigger a trap to report
548
548
the problem - see the DisMan Event MIB section later.
550
If this directive is not specified, the default threshold is 16 Mb.
550
If this directive is not specified, the default threshold is 16 MB.
551
551
.SS Log File Monitoring
552
552
This requires that the agent was built with support for either the
553
553
\fIucd-snmp/file\fR or \fIucd-snmp/logmatch\fR modules respectively
554
554
(both of which are included as part of the
555
555
default build configuration).
556
556
.IP "file FILE [MAXSIZE]"
557
monitors the size of the specified file (in Kb).
557
monitors the size of the specified file (in kB).
558
558
If MAXSIZE is specified, and the size of the file exceeds
559
559
this threshold, then the corresponding \fCfileErrorFlag\fR
560
560
instance will be set to 1, and a suitable description message reported
565
565
the problem - see the DisMan Event MIB section later.
568
A maximum of 20 files can be monitored.
570
If no \fIfile\fR directives are defined, then walking the
568
Note: A maximum of 20 files can be monitored.
570
Note: If no \fIfile\fR directives are defined, then walking the
571
571
\fCfileTable\fR will fail (\fInoSuchObject\fR).
572
.IP "logmatch NAME PATH CYCLETIME REGEX"
572
.IP "logmatch NAME FILE CYCLETIME REGEX"
573
573
monitors the specified file for occurances of the specified
576
.\" XXX - Need more details here!
579
A maximum of 50 files can be monitored.
581
If no \fIlogmatch\fR directives are defined, then walking the
574
pattern REGEX. The file position is stored internally so the entire file
575
is only read initially, every subsequent pass will only read the new lines
576
added to the file since the last read.
579
name of the logmatch instance (will appear as logMatchName under
580
logMatch/logMatchTable/logMatchEntry/logMatchName in the ucd-snmp MIB tree)
582
absolute path to the logfile to be monitored. Note that this path
583
can contain date/time directives (like in the UNIX 'date' command). See the
584
manual page for 'strftime' for the various directives accepted.
586
time interval for each logfile read and internal variable update in seconds.
587
Note: an SNMPGET* operation will also trigger an immediate logfile read and
590
the regular expression to be used. Note: DO NOT enclose the regular expression
591
in quotes even if there are spaces in the expression as the quotes will also
592
become part of the pattern to be matched!
598
logmatch apache-GETs /usr/local/apache/logs/access.log-%Y-%m-%d 60 GET.*HTTP.*
600
This logmatch instance is named 'apache-GETs', uses 'GET.*HTTP.*' as its
601
regular expression and it will monitor the file named
602
(assuming today is May 6th 2009): '/usr/local/apache/logs/access.log-2009-05-06',
603
tomorrow it will look for 'access.log-2009-05-07'. The logfile is read every 60
607
Note: A maximum of 250 logmatch directives can be specified.
609
Note: If no \fIlogmatch\fR directives are defined, then walking the
582
610
\fClogMatchTable\fR will fail (\fInoSuchObject\fI).
583
611
.SH "ACTIVE MONITORING"
584
612
The usual behaviour of an SNMP agent is to wait for incoming SNMP requests
782
810
Once again, this user must be explicitly created and given
783
811
suitable access rights.
785
.IP "notificationEvent ENAME NOTIFICATION [-n] [-i OID | -o OID ]*"
813
.IP "notificationEvent ENAME NOTIFICATION [-m] [-i OID | -o OID ]*"
786
814
defines a notification event named ENAME.
787
815
This can be triggered from a given \fImonitor\fR entry by specifying
788
816
the option \fI-e ENAME\fR (see above).
789
817
NOTIFICATION should be the OID of the NOTIFICATION-TYPE definition
790
818
for the notification to be generated.
792
If the \fI-n\fR option is given, the notification payload will
820
If the \fI-m\fR option is given, the notification payload will
793
821
include the standard varbinds as specified in the OBJECTS clause
794
822
of the notification MIB definition.
795
823
This option must come \fBafter\fR the NOTIFICATION OID