Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ratelimit as a systemd service; where are the logs ? #103

Closed
nskalis opened this issue Oct 28, 2019 · 3 comments
Closed

ratelimit as a systemd service; where are the logs ? #103

nskalis opened this issue Oct 28, 2019 · 3 comments
Labels

Comments

@nskalis
Copy link

nskalis commented Oct 28, 2019

Hi,

given a systemd service file:

  • envoy-ratelimit.service
[Unit]
Description=envoy-ratelimit
Requires=network-online.target
After=network-online.target
After=syslog.target

[Service]
Type=simple
User=root
EnvironmentFile=/etc/sysconfig/envoy-ratelimit
ExecStart=/usr/local/sbin/ratelimit $OPTIONS
ExecStop=/bin/kill -s TERM $MAINPID
Restart=on-failure
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=envoy-ratelimit

[Install]
WantedBy=multi-user.target

and its arguments

  • /etc/sysconfig/envoy-ratelimit
OPTIONS=""
RUNTIME_SUBDIRECTORY=ratelimit
LOG_LEVEL=info
PORT=8082
GRPC_PORT=8081
REDIS_SOCKET_TYPE=tcp
REDIS_URL=127.0.0.1:6389
USE_STATSD=false

when I run the ratelimit service via a command I can see the logs:

# RUNTIME_SUBDIRECTORY=ratelimit PORT=8082 REDIS_SOCKET_TYPE=tcp REDIS_URL=172.31.141.233:6389 LOG_LEVEL=WARN USE_STATSD=false /usr/local/sbin/ratelimit 
WARN[0000] statsd is not in use                         
WARN[0000] connecting to redis on tcp 172.31.141.233:6389 with pool size 10 
WARN[0000] Listening for HTTP on ':8082'                
WARN[0000] Listening for debug on ':6070'               
WARN[0000] Listening for gRPC on ':8081'   

when I run the above as a systemd service, can somebody advise where the logs appear ?

# systemctl status envoy-ratelimit.service 
● envoy-ratelimit.service - envoy-ratelimit
   Loaded: loaded (/etc/systemd/system/envoy-ratelimit.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2019-10-28 22:37:04 CET; 5s ago
  Process: 22110 ExecStop=/bin/kill -s TERM $MAINPID (code=exited, status=0/SUCCESS)
 Main PID: 22161 (ratelimit)
   CGroup: /system.slice/envoy-ratelimit.service
           └─22161 /usr/local/sbin/ratelimit
[root@nl-ams02c-ispweb01 system]# journalctl -f -u envoy-ratelimit
-- Logs begin at Sat 2019-03-16 05:00:02 CET. --

^C

/var/log/messages is also empty of logging from envoy-ratelimit

@nskalis
Copy link
Author

nskalis commented Oct 31, 2019

the issue seems to be with logrus described here sirupsen/logrus#66

logrus seems to be a development-only logger, and not meant for production

@stale
Copy link

stale bot commented Nov 30, 2019

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 30, 2019
@stale
Copy link

stale bot commented Dec 7, 2019

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted". Thank you for your contributions.

@stale stale bot closed this as completed Dec 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant