Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How nagios monitors http services that need to be authenticated

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article is about how nagios monitors http services that need to be authenticated. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Note: the domain name monitor.example.com is used for internal control and cannot be provided for external access, so the access to the root directory is restricted by using the htpasswd command.

1. The http service cannot be properly monitored using the default local configuration

-bash-4.1$ cat localhost.cfgdefine service {use local-service host_name localhost service_description HTTP check_command check_http notifications_enabled 0}

2. Monitor the http services that need to be verified:

Create a nagios authentication account and password: [root@monitor ~] # / data1/server/apache/bin/htpasswd / data1/server/nagios/etc/htpasswd nagios:nagios [root@monitor ~] # su-nagios-bash-4.1$ cd etc/objects/ definition New Command check_http_auth-bash-4.1$ vim commands.cfg# add the following content define command {command_name check_http_auth command_line $USER1 $/ check_http-H Monitor.example.com-a nagios:nagios}: wq./check_http-h# gets help through-h Get the argument to the check_http_auth command-bash-4.1$ vim localhost.cfgdefine service {use local-service Name of service template to use host_name localhost service_description HTTP check_command check_http_auth# modifies check_http to a new command check_http_auth notifications_enabled 0}

Switch to the root user and restart nagios:

[root@monitor ~] # service nagios restartStopping nagios: [OK] Starting nagios: [OK]

Thank you for reading! This is the end of this article on "how nagios monitors http services that need to be verified". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report