NameError: global name 'monitor' is not defined
ju2wheels opened this issue · 9 comments
WARNING [monitor:syslog_monitor] [syslog_monitor.py:451] Error handling request: global name 'monitor' is not defined
Traceback (most recent call last):
File "/usr/share/scalyr-agent-2/py/scalyr_agent/builtin_monitors/syslog_monitor.py", line 435, in handle
request_stream.process( data, self.server.syslog_handler.handle )
File "/usr/share/scalyr-agent-2/py/scalyr_agent/builtin_monitors/syslog_monitor.py", line 408, in process
handle_frame( self._remaining[self._offset:frame_end].strip() )
File "/usr/share/scalyr-agent-2/py/scalyr_agent/builtin_monitors/syslog_monitor.py", line 866, in handle
self.__handle_docker_logs( data )
File "/usr/share/scalyr-agent-2/py/scalyr_agent/builtin_monitors/syslog_monitor.py", line 846, in __handle_docker_logs
watcher.remove_log_path( module.module_name, info['log_config']['path'] )
File "/usr/share/scalyr-agent-2/py/scalyr_agent/copying_manager.py", line 372, in remove_log_path
log.log(scalyr_logging.DEBUG_LEVEL_0, "'%s' - trying to remove non-existent path from copy manager: '%s'" % ( monitor.module_name, log_path) )
NameError: global name 'monitor' is not defined
Using 2.0.44 but still appears to be present in 2.0.46
Thanks for this. Looks like the code bug has existed for a while
736f1b7#diff-07f2ba6fa499fadf438c26f4dd1c8a71R318
We'll fix this asap.
Update: bug fixed in #186. Will be part of next agent release (sometime next week).
Update: Latest (2.0.47) release has fix for this.
@ju2wheels, thank you for alerting to the problem! Much appreciated and let us know if you have any other issues.
@echee2 my team was wondering if there was a set release schedule for the point releases of the Docker container for these or if they go through any extra testing before being released as Docker containers (scalyr/scalyr-docker-agent)? If they dont go through extra testing then we can just use the Dockerfile included in the repo but we wanted to double check first.
Thanks
@ju2wheels , we currently release all versions (standalone rpm/deb, docker and k8s) all at the same time. As part of the release process, we do manually test the docker and k8s images. But there is no separate release cadence for docker.
The Dockerfiles don't change all that frequently and we've recently installed more complete smoke/unit tests which will alert us to problems. But if you need to reference a Dockerfile, perhaps consider using the release branch version?
I hope this answers your question.
Also in case you're not already aware, we recently started shipping 2 separate docker images:
The "older" scalyr/scalyr-agent-docker is just a copy of scalyr/scalyr-agent-docker-syslog
scalyr/scalyr-agent-docker-json is the recommended version (used to be syslog). It uses the underlying Docker JSON file logging driver.
Awesome, that does answer my question. Thanks