Cannot figure out what causes my sensu agent stops on some windows machines. These sensu agents after rebooting will stop after several days for unknown reasons (generally about one week). The error message found in the log file like this
“component”:“cmd”,“level”:“warning”,“msg”:“config attribute id has been deprecated, please use name instead”,“time”
and my agent.yml file like this:
api-port:
backend-url:
- “ws://ip-address:port#”
- “ws://ip-address:port”
- “ws://ip-address:port”
socket-port:
-
namespace: default
subscriptions:
- host_checks_win
- host_metrics_win
log-level: debug
Any ideas what caused this problem? Thanks a lot for your help.
Hey!
What version of the Windows agent are you running?
Also which method of sensu-agent service installation did you use?
I have to apologize, Windows is not the operating system I use most frequently so I’m not the best resource for troubleshooting Windows service. Just a few questions,
Is there evidence that Windows attempted to re-start the agent after it failed?
Either version 5.14.0 or 5.10.2
Hey!
Can you try to update to 5.15 and see if that helps.
So far, I updated all of sensu agents to 5.14.0 and found that does not help. One thing I noticed is this problem just happened again and again (randomly to me) in one of our data center, other data centers just works fine. I am not sure what caused this problem since the VM config on all of the data center looks same to me…
Hi, I have the same issue with version 5.16.1.
Here some additional information:
Installation via the command line interface of the sensu agent:
“c:\Program Files\Sensu\sensu-agent.exe” service install
Version information:
sensu-agent version 5.16.1, build 084ddb18026d3e6b54354e1b73afbe4db9b64ba9, built 2019-12-18T01:11:44Z
---
##
# agent configuration
##
#name: ""
#namespace: "default"
subscriptions:
- "windows_base"
backend-url:
- "ws://<my-server>:8081"
##
# authentication configuration
##
#user: "agent"
#password: "<my-password>"
##
# api configuration
##
#api-host: "127.0.0.1"
#api-port: 3031
disable-api: true
##
# socket configuration
##
disable-sockets: true
#socket-host: "127.0.0.1"
#socket-port: 3030
##
# statsd configuration
##
statsd-disable: true
#statsd-event-handlers: ""
#statsd-flush-interval: 10
#statsd-metrics-host: "127.0.0.1"
#statsd-metrics-port: 8125
##
# other
##
#cache-dir: "C:/ProgramData/Sensu/cache"
#config-file: ""
#deregister: false
#deregistration-handler: ""
#keepalive-timeout: 120
#keepalive-interval: 20
#extended-attributes: ""
#log-level: "warn"
#redact: ""
Hello!
Can anyone experiencing this problem delve into the Windows Event Viewer and see if the sensu-agent service is generating any warning or error events leading up to the moment it stopped?
-jef
Try increase your timeout, see if that will help. To me, sensu agent update from 5.14.0 to 5.14.2 and increasing timeout from <100 to about 300 help a lot.
You mean the keepalive timeout?
1 Like
Yes. It looks to me that Sensu agent will not shut down any more if keepalive timeout is set to a longer time.