-
Notifications
You must be signed in to change notification settings - Fork 72
Global Configuration
Inspeqtor has two configuration points: /etc/inspeqtor/inspeqtor.conf ("global") and /etc/inspeqtor/conf.d/*.inq ("inq").
Global configuration resides in /etc/inspeqtor/inspeqtor.conf
. There is where you tell Inspeqtor how to route alerts to you or other teams.
An alert route tells Inspeqtor how to contact a team. The generic syntax looks like this:
send alerts [to $TEAMNAME] via $CHANNEL with $KEY $VALUE, $KEY $VALUE
- TEAMNAME - if you don't include
to $TEAMNAME
, it indicates this is the default alert route. - CHANNEL - Inspeqtor supports two channels:
email
andgmail
.gmail
is just an alias for email which automatically fills in Google's SMTP setup for you. - KEY/VALUE - allow you to configure various elements of the channel
NB: Values with double quotes or commas in them should be quoted: with password "12jk1!,@#2\"123"
send alerts to ops
via gmail with username [email protected], password foobarBaz, email [email protected]
send alerts to accounting
via email with username bubba, password "correct horse battery staple", hostname smtp.example.com, email [email protected]
Your SMTP server must accept TLS connections on port 587.
Use set $KEY $VALUE
to twiddle various knobs that Inspeqtor exposes.
# a deploy will timeout after this many seconds
set deploy_length 300
# the number of seconds between scans
set cycle_time 15
# controls the log verbosity
# logging goes to /var/log/inspeqtor/current and is automatically rotated
set log_level info
Inspeqtor logs to /var/log/inspeqtor/current
. Log files are automatically rotated and gzip-compressed. Unfortunately a quirk of runit means old log files are named oddly: @timestamp.s
.
You can use double quotes to complete the filename and zcat and zgrep to look through and search old logs.
mike@www:/var/log/inspeqtor$ ls -l
total 4172
-rwxr--r-- 1 root root 1036572 Aug 24 08:13 @4000000053f99ebf02e589fc.s
-rwxr--r-- 1 root root 1263677 Sep 6 10:03 @40000000540adbf33ae5f314.s
-rw-r--r-- 1 root root 266 Aug 19 16:48 config
-rw-r--r-- 1 root root 1946271 Sep 7 21:18 current
-rw------- 1 root root 0 Aug 14 22:14 lock
-rw-r--r-- 1 root root 0 Sep 6 10:03 state
mike@www:/var/log/inspeqtor$ zgrep triggered "@40000000540adbf33ae5f314.s" | head -2
D 2014-08-24T08:13:56.052925Z 20185 inspeqtor[memory(rss)] still triggered. Current: 7061504, Threshold: 3145728
D 2014-08-24T08:14:11.056953Z 20185 inspeqtor[memory(rss)] still triggered. Current: 7061504, Threshold: 3145728
mike@www:/var/log/inspeqtor$