Nagios 多使用者管理

來源:互聯網
上載者:User

標籤:nagios多使用者


一、nagios除了管理使用者登入來管理往往是不夠的,我們公司有廣東、江西、北京等地的業務,甚至內部人員也需要來查看(唯讀)監控的項目或者警示資訊。


So...


二、先備份我們需要修改的兩個檔案

[[email protected] nagios]#cp /etc/nagios/htpasswd.users /etc/nagios/htpasswd.users.20150126bak

[[email protected] nagios]#cp /etc/nagios/cgi.cfg /etc/nagios/cgi.cfg.20150126bak


三、建立使用者,建立使用者的時候不要加-c,否則會覆蓋該檔案原有資料,xh是使用者名稱。輸入密碼確定即可

[[email protected] nagios]#htpasswd  /etc/nagios/htpasswd.users xh

New password: 

Re-type new password: 

Updating password for user xh


查看檔案,建立使用者成功,沒有覆蓋之前的使用者

[[email protected] nagios]# cat htpasswd.users

nagiosadmin:TxLl3Z4Hu/rgM

jxoperator:StFLcNbUYm8JQ

bjoperator:mIIZ6TKa85iyo

xh:HyPcV1ozVpCNg


四、賦予許可權,唯讀。經過測試,修改下面5行即可

[[email protected] nagios]#vi /etc/nagios/cgi.cfg


authorized_for_read_only=jxoperator,bjoperator,xh


authorized_for_all_services=nagiosadmin,xh

authorized_for_all_hosts=nagiosadmin,xh


authorized_for_all_service_commands=nagiosadmin,xh

authorized_for_all_host_commands=nagiosadmin,xh


五、重啟服務,使配置生效

/etc/init.d/httpd restart

/etc/init.d/nagios restart


本文出自 “卡卡西” 部落格,請務必保留此出處http://whnba.blog.51cto.com/1215711/1608478

Nagios 多使用者管理

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.