Log check error: Log file /var/log/messages is not readable!
Log check error: Log file /var/log/messages is not readable!
check_nrpe報錯
被監控伺服器:
[root@test log]# /usr/local/nagios/libexec/check_log -F /var/log/messages -O /tmp/tmp_messages -q "ERROR|Error|error|WARNING|Warning|warning" -e "end_request: I/O error"
Log check ok - 0 pattern matches found
監控伺服器:
[root@test libexec]# ./check_nrpe -H 192.168.0.78 -c check_log
Log check error: Log file /var/log/messages is not readable!
被監控伺服器端執行監測命令正常,監控伺服器執行監控命令不正常!!
原因分析:
在被監控伺服器是使用root使用者監測的,所以有許可權訪問!!!
但是從監控伺服器端訪問,透過ssl方式,用的是nagios使用者,所以導致了/var/log/messages檔案無法被nagios使用者訪問!!
解決辦法:
在被監控伺服器上對/var/log/messages檔案增加許可權:
[root@test log]# chmod 766 /var/log/messages
[root@sznagios libexec]# ./check_nrpe -H 192.168.129.21 -c check_log
Log check error: Log file /var/log/messages does not exist!
chown nagios /var/log
chown nagios /var/log/messages
chown nagios /tmp/tmp_messages
check_nrpe報錯
被監控伺服器:
[root@test log]# /usr/local/nagios/libexec/check_log -F /var/log/messages -O /tmp/tmp_messages -q "ERROR|Error|error|WARNING|Warning|warning" -e "end_request: I/O error"
Log check ok - 0 pattern matches found
監控伺服器:
[root@test libexec]# ./check_nrpe -H 192.168.0.78 -c check_log
Log check error: Log file /var/log/messages is not readable!
被監控伺服器端執行監測命令正常,監控伺服器執行監控命令不正常!!
原因分析:
在被監控伺服器是使用root使用者監測的,所以有許可權訪問!!!
但是從監控伺服器端訪問,透過ssl方式,用的是nagios使用者,所以導致了/var/log/messages檔案無法被nagios使用者訪問!!
解決辦法:
在被監控伺服器上對/var/log/messages檔案增加許可權:
[root@test log]# chmod 766 /var/log/messages
[root@sznagios libexec]# ./check_nrpe -H 192.168.129.21 -c check_log
Log check error: Log file /var/log/messages does not exist!
chown nagios /var/log
chown nagios /var/log/messages
chown nagios /tmp/tmp_messages
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29500582/viewspace-1345805/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- AAPT2 error: check logs for detailsAPTErrorAI
- Linux下如果/var/log/messages停止寫入內容了,如何重新啟動syslogd .Linux
- log file sync 和 log file parallel writeParallel
- Archive Log模式下Redo Log、Check Point和Switch LogHive模式
- /var/log/message 錯誤error (network unreachable)Error
- InnoDB: Error: log file ./ib_logfile0 is of different size 5242880 bytesError
- linux下的syslog和/var/logLinux
- MySQL error log和bin logMySqlError
- mha_replication_check Can't exec "mysqlbinlog": No such file or directoryMySql
- WebLogic - HTTP Session Subsystem MessagesWebHTTPSession
- log file switch
- Could not find first log file name in binary log index fileIndex
- Catalog archivelog from file system to Asmdg;HiveASM
- ORA-00205: error in identifying control file, check alert log for more infoErrorIDE
- ssserver -c /etc/shadowsocks.json --log-file /var/log/shadowsocks.log -d start啟動失敗ServerJSON
- reduce the database log fileDatabase
- 測試中出現ERROR StatusLogger No log4j2 configuration fileError
- [ERROR] Failed to open logErrorAI
- error log about AIXErrorAI
- Oracle之 等待事件log file sync + log file parallel write (awr優化)Oracle事件Parallel優化
- log file sync等待事件事件
- 【等待事件】log file sync事件
- redo log file 優化優化
- LOG FILE SWITCH等待事件事件
- log file sync" 等待事件事件
- Oracle Dump Redo Log FileOracle
- _use_adaptive_log_file_sync設定 降低log_file_sync等待APT
- log file sync(日誌檔案同步) 與 Log file parallel write 等待事件Parallel事件
- Mysql系統變數中 log_error_services | log_filter_internal; log_sink_internal 和 log_error_verbosity | 2 解釋MySql變數ErrorFilter
- mysql 配置log_errorMySqlError
- Oracle EBS log file (R12.1.3) - R12安裝log及其他logOracle
- 有關在/var/log/messages 中出現SIGCHLD set to SIG_IGN的問題GC
- Linux File System Change Monitoring Technology、Notifier TechnologyLinux
- alter system switch log file 與 archive log current/all 區別Hive
- redo的等待log file sync和log file parallel write和redo size設定Parallel
- "log file sync"等待事件-2事件
- "log file sync"等待事件-1事件
- 等待事件 log file sync 小解事件