【问题标题】:Check_mk recurring scheduled maintenaceCheckmk 定期定期维护
【发布时间】:2017-08-01 11:37:00
【问题描述】:

我正在尝试创建脚本以使主机处于停机状态,

创建用户(check_mk 管理员),并设置密码,

然后运行su sitename curl -n -s "http://localhost/site/check_mk/view.py?_do_confirm=yes&_transid=-1&_do_actions=yes&host=host&site=site&view_name=host&_down_comment=COMMENT&_down_from_now=From+now+for&_down_minutes=1&_username=automation&_secret=secret

但是得到了

<html><head>
<title>401 Unauthorized</title>
</head><body>
<h1>Unauthorized</h1>
<p>This server could not verify that you
are authorized to access the document
requested.  Either you supplied the wrong
credentials (e.g., bad password), or your
browser doesn't understand how to supply
the credentials required.</p>
</body></html>

密码和用户名都可以

【问题讨论】:

    标签: bash shell nagios check-mk


    【解决方案1】:

    我找到了我自己问题的部分答案:),通过为自动化用户设置密码并将其放入 curl (username:password) 中消除了 401 错误,删除了 _username 和 _secret 部分,现在又从 curl 中获得了输出无法将主机设置为停机,通过创建新的时间段(排除服务器不应接收通知的时间并为服务通知创建规则并指定新的时间段并指定新的时间段)来实施解决方法。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2010-12-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多