在 Zabbix 中将主机名问题标记为已解决 [英] Mark a hostname problem as resolved in Zabbix

查看:45
本文介绍了在 Zabbix 中将主机名问题标记为已解决的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对使用 Zabbix 还很陌生,在使用该平台进行初始测试时,我已经添加了一些主机.

I am fairly new to using Zabbix, and I have added a few hosts to it while doing my initial tests with the platform.

在进行此配置时,我配置了一些错误,例如让其中一个代理中的主机名不正确.当我最终在代理配置文件中修复代理主机名时,它开始在 Zabbix 仪表板中出现问题.

When doing this configuration, I have misconfigured a few things, such as leaving the hostname incorrect in one of the agents. When I finally fixed the agent hostname in the agent configuration file, it started appearing as a problem in Zabbix dashboard.

它指出zabbix_agentd 的主机名已在 [my.monitored.host.tld] 上更改".这是一个误报,这不是问题,而是更正.

It states that "Host name of zabbix_agentd was changed on [my.monitored.host.tld]". This is a false positive, it was not a problem but in fact a correction.

我想让这个触发器保持开启状态,但我希望能够将其标记为已解决,因为它是配置更改,而不是由于无意中更改了文件而导致的问题.

I want to leave this trigger on, but I would like to be able to mark this as resolved as it was a configuration change, and not a problem due to files being changed inadvertently.

我该怎么做?这样做的唯一方法是必须更改触发器以允许手动关闭吗?如果是这样,我从哪里访问它?我尝试转到主机,单击该主机上的触发器,然后选择主机名"触发器,但我看到手动关闭复选框已禁用.

How can I do this? Is the only way to do this having to change the trigger to allow manual closing? And if so, where do I access that? I tried going to the host, clicking on the triggers that are on that host, then select the "host name" trigger, but I see the manual close checkbox disabled.

推荐答案

某些触发器或项目字段只能在其相关模板中进行修改.

如果主机触发器附加到主机上的模板,您将无法在主机触发器中启用允许手动关闭".有两种方法可以解决这个问题:

Some trigger or item fields can only be modified in their relevant templates.

You won't be able to enable 'Allow Manual Close' in your host's triggers if they are attached to templates on the host. There are two options to get around this:

每当您选择附加到模板的触发器时,触发器配置页面的顶部都会有一个父触发器"链接.(如果有多个由=>"箭头分隔,则表示继承有很多层,要编辑任何一层,您必须直接到最上面的一层).

Whenever you select a trigger that's attached to a template, the top of the trigger configuration page will have a 'Parent Triggers' link or links. (If there are multiple separated by '=>' arrows, it means there's many layers of inheritance, and to edit any you'll have to go right to the top one).

到达顶部后,所有字段都应该是可编辑的,包括手动关闭和触发器表达式本身等内容.

Once you're at the top, all the fields should be editable, including things like Manual Close and the trigger expression itself.

注意:此选项将修改 所有 附加到此模板的主机.仔细考虑应该在一台主机上和整个子集上进行哪些更改.

如果您不喜欢修改所有使用此模板的主机的想法 - 例如,您可能不希望任何技术人员能够手动解析所有主机的主机名更改警报,而只想一个 - 您可以在主机内克隆原始触发器,然后禁用它.

If you don't like the idea of modifying all the hosts that use this template - for example, you may not want any technicians to be able to manually resolve hostname change alerts for all hosts, but rather just the one - you can clone the original trigger within the host, then disable it.

解释一下,由于您无法修改基于模板的触发器,因此可以打开触发器配置,点击克隆"(确保您仍在主机的上下文中,而不是而不是模板的上下文)并在新创建的触发器中进行所需的更改.这样就可以开启手动关闭,确认新的触发器,只有选中的主机会受到影响.

To explain, since you can't modify the template-based triggers, it's possible to open the trigger configuration, hit 'Clone' (making sure you're still in the host's context, rather than the template's context) and make the changes you want in the newly created trigger. In this way, you can enable manual close, confirm the new trigger, and only the selected host will be affected.

如果您要使用此解决方法,则应确保不要忘记禁用原始方法!从主机上的触发器列表中识别哪个是哪个的简单方法是检查触发器名称旁边的模板名称 - 基于模板的触发器将始终在触发器列表中具有指向其模板的链接,而特定于主机的触发器没有.

If you are going to use this workaround, you should make sure not to forget to disable the original one! An easy way to identify which is which from the Triggers list on the host is to check for the Template name next to the Trigger name - template-based triggers will always have a link to their template on the triggers list, while host-specific triggers have none.

很遗憾,您不能在不删除整个模板的情况下删除模板触发器.如果您发现需要像这样修改多个主机,您可能需要考虑为这些主机创建一个新模板,并进行相关修改;从长远来看,拥有太多特定于单个主机的条件会使更改它们的条件非常耗时.与往常一样,请考虑您的环境以及什么对您的组织最有意义.

Unfortunately you can't delete the template trigger without removing the entire template. If you find you need to modify a number of hosts like this, you might want to consider creating a new template for these hosts, with the relevant modifications; having too many single host-specific conditions can make changing their conditions quite time consuming in the long run. As always, consider your environment and what makes most sense for your organisation.

顺便说一句,对于这种情况,手动关闭(可能)是最好的选择.在警报系统中,尤其是像 Zabbix 这样的警报系统,我们往往更喜欢一些误报,所以离开触发是(在大多数情况下)正确的想法.在 Zabbix 中,您可以忽略触发器直到它解决(默认情况下,像这样的配置更改触发器往往会在下一次检查时解决),但是如果您依赖 Zabbix Web 界面本身来提供信息,这些忽略/公认的触发因素会使发现实际问题变得更加困难.在不完全禁用它们的情况下,手动关闭可确保您可以在必要时立即解决它们,否则仍然可以使用它们.

As an aside, manual close is (probably) the best option for cases like this. In an alerting system, particularly one like Zabbix, we can tend to prefer a few false positives, so leaving the trigger on is (for most cases) the right idea. In Zabbix, you could ignore the trigger until it resolves (config change triggers like this one tend to be resolved at the next check, by default), but if you're relying on the Zabbix web interface itself to provide information, these ignored/acknowledged triggers can make spotting the actual problems harder. Without disabling them entirely, manual close makes sure you can resolve them immediately whenever necessary and still have them around otherwise.

这篇关于在 Zabbix 中将主机名问题标记为已解决的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆