1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227
|
.\" $Id: moncmd.1,v 1.7 1997/09/18 14:42:38 trockij Exp $
.TH moncmd 1 "$Date: 1997/09/18 14:42:38 $" Linux "moncmd"
.SH NAME
moncmd \- send commands to mon daemon and show the results.
.SH SYNOPSIS
.B moncmd
.RB [ \-d ]
.RB [ \-s
.IR server ]
.RB [ \-p
.IR port ]
.SH DESCRIPTION
.B moncmd
sends commands to the
.B mon
server.
.SH OPTIONS
.TP
.B \-d
enable debugging, which is the same as
.B \-s
.IR localhost .
.TP
.BI \-s\ server
Connect to
.IR server .
.TP
.BI \-p\ port
Use TCP port
.I port
when connecting to the server, instead of the
default of 32777.
.SH MONITOR HOST
.B moncmd
by default will look for a mon host to connect
to in the MONHOST
environment variable.
If it is not defined, it will try to use
the
.B \-s
parameter. Otherwise, it will complain.
.SH COMMANDS
The following is a list of the commands that
the server understands.
.TP
.BI "dump " group " " servicename
List all variable values for
.I group
and
.IR servicename .
.\"
.\"
.TP
.BI "enable|disable service " group " " servicename
Enables/disables alerts for
.I group
and
.IR servicename .
.\"
.\"
.TP
.BI "enable|disable host " hostname
Enables/disables host
.I hostname
in all groups. When the monitor is called, this
hostname will not be included in the list of
hostnames sent to the monitor. If a group has only
one hostname in it, then the
.BI "enable|disable watch"
command should be used instead.
.\"
.\"
.TP
.BI "enable|disable watch " watchgroup
Enables/disables an entire watch for
.IR watchgroup ,
as defined in
the configuration file. Disabling a watch not only
stops alerts from happening, but it stops the actual
monitor processes from being scheduled.
.\"
.\"
.TP
.BI "reset"
Resets the server, forcing it to re-read the configuration file,
kill off currently running monitors,
restart all monitoring, and reset all counters.
This command is only accessible if
.B moncmd
connects from the host which is running the
.B mon
server.
.\"
.\"
.TP
.BI "list group " groupname
Lists the members of group
.IR groupname .
.\"
.\"
.TP
.BI "list alerthist"
Lists the last alarms triggered for each service of each
watch group, in addition to the summary output. The number
of alerts to keep in memory is bounded by the
.I maxkeep
variable, configurable on the
.B mon
command line at startup, and expandable with the
.B set
command during runtime.
.\"
.\"
.TP
.BI "list failurehist"
Lists the last failures, in addition to the summary output.
This is also limited by the
.I maxkeep
variable.
.\"
.\"
.TP
.BI "list opstatus"
Lists operational status of all services. Reports whether the last time
a service group was tested resulted in success or failure. The output
is:
.nf
group service untested
group service time timeleft succeeded
group service time timeleft failed output
.fi
where
.I output
is the first line of output from the monitor script
which failed,
.I time
is the time that the condition was last noticed in
.BR time (2)
format, and
.I timeleft
is the number of seconds left until the service is tested
again.
.\"
.\"
.TP
.BI "list successes"
Generates the same output as the
.B "list opstatus"
command, but only shows the services that
have succeeded the last time they were tested.
.\"
.\"
.TP
.BI "list failures"
Generates the same output as the
.B "list opstatus"
command, but only shows the services that
have failed the last time they were tested.
.\"
.\"
.TP
.BI "list disabled"
Lists all hosts and services which have been disabled by the
.B "disable host|service"
command.
.\"
.\"
.TP
.BI "list pids"
Shows the currently active watch groups/services along with their
process IDs, and it process ID of the server daemon.
.\"
.\"
.TP
.BI "list watch"
Lists all services and all groups.
.\"
.\"
.TP
.BI "set " group " " service " " variable " " value
Sets a variable to value. Useful for temporarily changing an interval
or alertevery value. Be careful, because this can just set any
value in the %watch hash, and some values that are specified in
the configuration file like "10m" or "35s" are converted and stored as
just plain integer seconds (e.g. "alertevery").
.\"
.\"
.TP
.BI "get " group " " service " " variable
Displays the value of group service variable.
.\"
.\"
.TP
.BI "set " variable " " value
Assigns
.I value
to the global variable
.IR variable .
.\"
.\"
.TP
.BI "get " variable
Shows the value of global variable
.IR variable .
.\"
.\"
.TP
.BI "term"
Terminates the server.
This command is only accessible if
.B moncmd
connects from the host which is running the
.B mon
server.
.SH VARIABLES
This is a list of the tunable global variables:
.TP
.B "maxkeep"
The maximum number lines of alert of failure history to retain.
.SH SEE ALSO
mon(1)
.SH BUGS
Report bugs to the email address below.
.SH AUTHOR
Jim Trocki <trockij@transmeta.com>
|