Commit b64d15f1 authored by Adam Wujek's avatar Adam Wujek 💬

rootfs: add log destination option for monit to dot-config

Update Kconfig
Update user-manual
Update monit's init script
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 6d931c7e
......@@ -109,6 +109,17 @@ config WRS_LOG_SNMPD
note that unknown facility names will generate a runtime error on the
switch.
config WRS_LOG_MONIT
string "Logging directions for the monit"
default "syslog"
help
The string can be a pathname (e.g. /dev/kmsg) or a "syslog" string.
An empty strings is used to represent no logging. If it is needed to
select facility and level please leave here empty string and change
/etc/monitrc file directly.
Please note that unknown facility names will generate a runtime error
on the switch.
config KEEP_ROOTFS
bool "Keep generated filesystem and related script"
help
......
......@@ -498,6 +498,14 @@ value is changed by the web interface, proper action is taken.
strings selects no logging at all. Please note that unknown facility
names will generate a runtime error on the switch.
@item CONFIG_WRS_LOG_MONIT
The string can be a pathname (e.g. @t{/dev/kmsg}) or a @t{syslog}
string.
An empty string is used to represent no logging. If it is needed to
select facility and level please leave here empty string and change
@t{/etc/monitrc} file directly.
Please note that unknown facility names will generate a runtime error
on the switch.
@item CONFIG_PORT00_PARAMS
@itemx CONFIG_PORT01_PARAMS
......
......@@ -52,9 +52,21 @@ init() {
fi
if [ -z "$CONFIG_MONIT_DISABLE" ]; then
if [ -z $CONFIG_WRS_LOG_MONIT ]; then
LOG="";
elif echo "$CONFIG_WRS_LOG_MONIT" | grep / > /dev/null; then
# if a pathname, use it
LOG="-l $CONFIG_WRS_LOG_MONIT";
else
# not a pathname, monit cannot take facility nor level from command
# line, only possible from configuration file
LOG="-l syslog"
fi
echo "Start monit"
# start monit
/usr/bin/monit
/usr/bin/monit $LOG
else
echo "Monit disabled in dot-config"
loop_forever
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment