大网数据广告活动
服务器运维问答

Using Nagios Event Handlers to bring system back in correct state

· 52CE 我爱测

I've read up on config management/provisioning tools like Ansible and SaltStack. These sound pretty good to me and I intend to use one of the two heavily (Not yet decided which altough I'm leaning towards Ansible). Ideally I want…

问题原文

原帖链接 · Gbrits · CC BY-SA 4.0

I've read up on config management/provisioning tools like Ansible and SaltStack. These sound pretty good to me and I intend to use one of the two heavily (Not yet decided which altough I'm leaning towards Ansible). Ideally I want to use on of the two to control all aspects of configuration and command-execution in the system. I.e: from initial bootstrapping, ad-hoc commands, but also when a system-wide exception happens.

To this end it seems that I could use Nagios event handlers (when correctly setup) to in turn execute configured ansible playbooks (or the saltstack equivalant) to try to bring the system back in a correct state.

Is this setup often used? Any reasons this would not be a good idea?

I'm asking because it seems logical/convenient to me to have all config under 1 tool (ansible or saltstack), but information on using a combination of Nagios (or similar) and Ansible (or similar) as described seems to be really sparse/non-existent.

已采纳解答

原帖链接 · Tom O'Connor · CC BY-SA 3.0

It's a reasonable idea, but you have to be VERY careful that your automated actions are precise and accurate.

You need to be absolutely sure that the failure state you're experiencing can be resolved with those automated actions to reset it (accurate).

You also need to make damn sure that your actions are totally idempotent, in case something goes wrong, and it triggers the wrong reconfiguration service. (precise).

It's not a bad idea, all together, but the problems surrounding state flap are the ones that'll catch you the quickest. From experience, they even catch me, where I've restarted something automatically, and not been aware that it's stuck (or running, depending on your point of view).

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2013-07-15)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0 / CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。