1 year ago
#346337
FadMan
Promtail Error on RHEL 6 [caller=main.go:115 msg="error creating promtail" error="at least one client config should be provided"]
I have been trying to install Promtail on a RHEL 6 server and keep getting this error
Error: caller=main.go:115 msg="error creating promtail" error="at least one client config should be provided"
It seems to be requesting for the config file which has been passed CONFIG_FILE=/usr/local/bin/promtailconf.yml
I have done this deployment a number of times on RHEL 8 without a hitch not sure what i am getting wrong
#cat /etc/init.d/promtail
#! /bin/bash
# chkconfig: 345 20 80
# description: my service
345 - 3,4,5 runlevels
20 - start priority
80- stop prioroty
RETVAL=0
PROG="promtail"
EXEC=/usr/local/bin/promtail
LOCKFILE="/var/lock/subsys/$PROG"
LOGFILE=/var/log/promtail.log
DATADIR=/usr/local/bin/promtail/data
CONFIG_FILE=/usr/local/bin/promtailconf.yml
ErrLOGFILE=/var/log/promtail_error.log
# Source function library.
if [ -f /etc/rc.d/init.d/functions ]; then
. /etc/rc.d/init.d/functions
else
echo "/etc/rc.d/init.d/functions is not exists"
exit 0
fi
start() {
if [ -f $LOCKFILE ]
then
echo "$PROG is already running!"
else
echo -n "Starting $PROG: "
nohup $EXEC $OPTIONS > $LOGFILE 2> $ErrLOGFILE &
RETVAL=$?
[ $RETVAL -eq 0 ] && touch $LOCKFILE && success || failure
echo
return $RETVAL
fi
}
stop() {
echo -n "Stopping $PROG: "
killproc $EXEC
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -r $LOCKFILE && success || failure
config file cat /usr/local/bin/promtailconf.yml
server:
http_listen_port: 9080
grpc_listen_port: 0
positions:
filename: /tmp/positions.yaml
clients:
- url: http://xxx.xxx.xxx.xxx:3100/loki/api/v1/push
scrape_configs:
- job_name: system
static_configs:
- targets:
- localhost
labels:
job: varlogs
__path__: /var/log/*log
grafana
rhel6
grafana-loki
promtail
0 Answers
Your Answer