banner

[Rule] Rules  [Home] Main Forum  [Portal] Portal  
[Members] Member Listing  [Statistics] Statistics  [Search] Search  [Reading Room] Reading Room 
[Register] Register  
[Login] Loginhttp  | https  ]
 
Messages posted by: hotdog019  XML
Profile for hotdog019 Messages posted by hotdog019 [ number of posts not being displayed on this page: 0 ]
 
Cảm ơn bạn nhé, để mình thử xem sao.
Mình đang viết 1 perl script lọc lỗi từ cảnh báo từ /var/log/message trong centos về, đọc ra một file .txt rồi. Nhưng chưa biết code thế nào để gửi file .txt đó ra email.
Nhờ mọi người giúp đỡ! thanks.
Đúng như bác nói bác quanta à. Sau khi cài net-snmp và net-snmp-utils em phải cài lại nagios-plugin thì thấy xuất hiện check_snmp trong libexec. Nhưng lại tiếp tục mắc một lỗi là khi vào trang admin của nagios thì không vào được hoàn toàn trắng xoá em phải tạo lại database cho nagiosadmin mới vào được. Cảm ơn bác nhiều!
Em cài nagios lâu rồi pác à, mới đây định thử vài services chạy qua snmp nhưng vào libxec không thấy check_snmp đâu. Nên mới lên mạng sớt thấy bảo cài 2 gói net-snmp và net-snmp-util em mới cài, nhưng cài xong vẫn ko thấy check_snmp trong libxec bác à.
[root@localhost src]# locate check_snmp
/usr/local/nagios/bin/check_snmp_disk
/usr/local/nagios/bin/check_snmp_load
/usr/local/nagios/bin/check_snmp_process
/usr/local/nagios/libexec/check_snmp.sh
/usr/local/nagios/libexec/check_snmp_int
/usr/local/nagios/libexec/check_snmp_process
/usr/local/nagios/libexec/check_snmp_storage
/usr/src/check_snmp_plugins
/usr/src/check_snmp_plugins.tar.gz
/usr/src/nagios-plugins-1.4.15/contrib/check_snmp_disk_monitor.pl
/usr/src/nagios-plugins-1.4.15/contrib/check_snmp_printer.pl
/usr/src/nagios-plugins-1.4.15/contrib/check_snmp_process_monitor.pl
/usr/src/nagios-plugins-1.4.15/contrib/check_snmp_procs.pl
/usr/src/nagios-plugins-1.4.15/plugins/check_snmp.c
/usr/src/nagios-plugins-1.4.15/plugins/.deps/check_snmp.Po
/usr/src/nagios-plugins-1.4.15/plugins/t/check_snmp.t
/usr/src/nagios-plugins-1.4.15/plugins/tests/check_snmp.t
/usr/src/nagios-plugins-1.4.15/plugins/tests/check_snmp_agent.pl

em cài xong rồi mà chỉ có thế này thôi
Em cài net-snmp-5.4.2 và Net-SNMP-Util-1.04 rồi bác. Net-SNMP-Util có khác Net-SNMP-Utils không bác?
Em cài nagios-plugin rồi, nhưng trong libxec không có check_snmp bác quanta à. Bác giúp em với.
Các sư huynh giúp em với em cài nagios xong nhưng không có check_snmp trong /usr/local/nagios/libxec/. Em phải làm thế nào đây các sư huynh?
anh cắm usb-3g vtl vào nó cứ báo thể à? Bây giờ đã xử lý dc chưa bác?
Bác cài trên máy ảo pk bác?
Cảm ơn anh quanta, em sẽ vào trang www.nagios.org để xem luôn.
ah thế à. Em mới tập tành cài xong con nagios và nagiosadmin nghe nói dùng perl hay shell script gì đó để phát triển nagios plugin. Mong bác chỉ giúp em cách viết một script để phát triển nagios plugin. EM chưa hình dung được thực hiện phải cần những yếu tố nào: công cụ, môi trường, thực hiện viết shell script ở đâu ...? Em cảm ơn bác.
Có thằng nagios XI nhưng chưa thấy gì hay hơn nagios core. Nếu phát triển nagios plugin thì cũng hay bác quanta ạ, viết script bằng perl. Bác đã cài một ứng dụng monitoring nào chưa bác? bác thích chương trình nào?
Hi cả nhà,

Cả nhà đã có ai cấu hình nagiosadmin chưa?
hic bác quanta ơi bác có biết em dốt thế nào ko? chỉ một sơ suất nhỏ mà em mày mò hỳ hục mãi cho việc cài nagios, cứ kiểm tra log mà ko biết lỗi do đâu. Ngồi ngẫm nghĩ mãi hoá ra khi gõ http://localhost/nagios thì có 2 thằng localhost bao gồm thằng máy thật và máy ảo nên nó ko biết thằng nào, kiểm tra lại thì rõ ràng là mình ko đặt IP con máy ảo sau d/c localhost ở trong file nagios.conf. Bây giờ thì vào ngon lành rồi bác à. Em đang cài tiếp nagiosadmin, có gì sẽ báo bác nhé. Thanks bác nhiều!!!
Bác quanta có thể nói qua cho em sau khi cài gói nagios và plugin thì phải thực hiện các chỉnh sửa thêm bớt như thế nào ở đâu nữa à? Cảm ơn bác luôn nhiệt tình giúp đỡ! Mong bác
error_log như sau:

[Wed May 11 11:02:56 2011] [notice] caught SIGTERM, shutting down
[Wed May 11 11:02:56 2011] [notice] SELinux policy enabled; httpd running as context root:system_r:httpd_t:s0
[Wed May 11 11:02:56 2011] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed May 11 11:02:57 2011] [notice] Digest: generating secret for digest authentication ...
[Wed May 11 11:02:57 2011] [notice] Digest: done
[Wed May 11 11:02:57 2011] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations

access_log như sau:

127.0.0.1 - - [11/May/2011:10:52:03 +0700] "GET / HTTP/1.0" 200 536 "-" "check_http/v1.4.15 (nagios-plugins 1.4.15)"
127.0.0.1 - - [11/May/2011:10:57:03 +0700] "GET / HTTP/1.0" 200 536 "-" "check_http/v1.4.15 (nagios-plugins 1.4.15)"
127.0.0.1 - - [11/May/2011:11:02:03 +0700] "GET / HTTP/1.0" 200 536 "-" "check_http/v1.4.15 (nagios-plugins 1.4.15)"
127.0.0.1 - - [11/May/2011:11:07:03 +0700] "GET / HTTP/1.0" 200 536 "-" "check_http/v1.4.15 (nagios-plugins 1.4.15)


Log như vậy là ko có vấn đề gì pk các pác. Vậy mà vẫn ko vào http://localhost/nagios mới cú chứ. Các bác giúp em với. Thanks các bác!
[root@localhost httpd]# vim error_log
[Sat Apr 30 00:06:31 2011] [notice] SELinux policy enabled; httpd running as context root:system_r:httpd_t:s0
[Sat Apr 30 00:06:31 2011] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sat Apr 30 00:06:31 2011] [notice] Digest: generating secret for digest authentication ...
[Sat Apr 30 00:06:31 2011] [notice] Digest: done
[Sat Apr 30 00:06:31 2011] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Sat Apr 30 04:30:07 2011] [notice] caught SIGTERM, shutting down
[Sat Apr 30 04:30:08 2011] [notice] SELinux policy enabled; httpd running as context root:system_r:httpd_t:s0
[Sat Apr 30 04:30:08 2011] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sat Apr 30 04:30:08 2011] [notice] Digest: generating secret for digest authentication ...
[Sat Apr 30 04:30:08 2011] [notice] Digest: done
[Sat Apr 30 04:30:08 2011] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Sat Apr 30 04:45:11 2011] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
[Sat Apr 30 04:46:11 2011] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
[Sat Apr 30 04:47:11 2011] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
[Sat Apr 30 04:48:11 2011] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
[Sat Apr 30 04:53:11 2011] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
[Sat Apr 30 04:58:11 2011] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
[Sat Apr 30 05:03:11 2011] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
[Sat Apr 30 05:08:11 2011] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
[Sat Apr 30 05:08:59 2011] [notice] caught SIGTERM, shutting down
[Sat Apr 30 05:08:59 2011] [notice] SELinux policy enabled; httpd running as context root:system_r:httpd_t:s0
[Sat Apr 30 05:08:59 2011] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sat Apr 30 05:08:59 2011] [notice] Digest: generating secret for digest authentication ...
[Sat Apr 30 05:08:59 2011] [notice] Digest: done
[Sat Apr 30 05:08:59 2011] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Sat Apr 30 05:13:11 2011] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
[Sat Apr 30 05:18:11 2011] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
[Sat Apr 30 05:23:11 2011] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
[Sat Apr 30 05:28:11 2011] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
[Sat Apr 30 05:33:11 2011] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
[Sat Apr 30 05:38:11 2011] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
[Sat Apr 30 05:43:11 2011] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
[Sat Apr 30 05:48:11 2011] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
[Sat Apr 30 05:53:11 2011] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
[Sat Apr 30 05:58:11 2011] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
[Sat Apr 30 06:03:11 2011] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
[Sat Apr 30 06:08:11 2011] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
[Sat Apr 30 06:13:11 2011] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
[Sat Apr 30 06:18:11 2011] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
[Sat Apr 30 06:23:11 2011] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
[Sat Apr 30 06:28:11 2011] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
[Sat Apr 30 06:33:11 2011] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
[Sat Apr 30 06:38:11 2011] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
[Sat Apr 30 06:43:11 2011] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
[Sat Apr 30 06:48:11 2011] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
"error_log" 92L, 9830C

[root@localhost httpd]# vim access_log
127.0.0.1 - - [30/Apr/2011:04:45:11 +0700] "GET / HTTP/1.0" 403 5043 "-" "check_http/v1.4.15 (nagios-plugins 1.4.15)"
127.0.0.1 - - [30/Apr/2011:04:46:11 +0700] "GET / HTTP/1.0" 403 5043 "-" "check_http/v1.4.15 (nagios-plugins 1.4.15)"
127.0.0.1 - - [30/Apr/2011:04:47:11 +0700] "GET / HTTP/1.0" 403 5043 "-" "check_http/v1.4.15 (nagios-plugins 1.4.15)"
127.0.0.1 - - [30/Apr/2011:04:48:11 +0700] "GET / HTTP/1.0" 403 5043 "-" "check_http/v1.4.15 (nagios-plugins 1.4.15)"
127.0.0.1 - - [30/Apr/2011:04:53:11 +0700] "GET / HTTP/1.0" 403 5043 "-" "check_http/v1.4.15 (nagios-plugins 1.4.15)"
127.0.0.1 - - [30/Apr/2011:04:58:11 +0700] "GET / HTTP/1.0" 403 5043 "-" "check_http/v1.4.15 (nagios-plugins 1.4.15)"
127.0.0.1 - - [30/Apr/2011:05:03:11 +0700] "GET / HTTP/1.0" 403 5043 "-" "check_http/v1.4.15 (nagios-plugins 1.4.15)"

Đây là log của acces_log và error_log bác à.
Bước 1: download các gói cần cài
Bước 2: Cài đặt nagios
- Tạo account: username: nagios ; group: nagios
# useradd nagios
# passwd nagios
- Cài các gói: apache, php, gcc, glibc, glibc-common, gd, gd-devel, png, png-devel, jpeg, jpeg-devel, zlib, zlib-devel
# yum install httpd php gcc glibc glibc-common gd gd-devel, png, png-devel, jpeg, jpeg-devel, zlib, zlib-devel
- Download các gói nagios về thư mục /opt/download và install bằng các lệnh
#./configure --with-command-group=nagios
# make all
# make install
# make install-init
# make install-config
# make install-commandmode
# make install-webconf
- Tao user để truy cập web nagios (user: nagiosadmin, password: nagiosadmin)
# htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
- Restart apache
# service httpd restart
- Cấu hình plugin và gán quyền truy xuất cho user nagios:
#chown nagios.nagios /usr/local/nagios
#chown -R nagios.nagios /usr/local/nagios/libexec
Bước 3: Cấu hình các file cấu hình trong nagios
#vi /usr/local/nagios/etc/nagios.cfg
Và các file *.cfg trong cùng thư mục
- Kiểm tra lỗi trong quá trình cấu hình
#/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
- Đưa nagios vào system startup
# chkconfig --add nagios
# chkconfig nagios on
- Cài nagios plugin
# tar -zxvf nagios-plugins-1.4.14.tar.gz
# cd nagios-plugins-1.4.14
# ./configure --with-nagios-user=nagios --with-nagios-group=nagios
# make
# make install

Đây là các bước em cài. Em cài các bước như trên đều thành công. Bác xem em cần bổ sung gì không? Cảm ơn bác nhiệt tình với em.
httpd của em cũng chạy ngon lành rồi bác. Theo bác nguyên nhân có thể do đâu?
vâng khi em vào http://localhost/nagios nó báo unable to connect bác à
Chào bác quanta, theo ý bác là phải tạo thư mục /home/nagios phải không? Sau khi em tạo thư mục này chạy lệnh thì vẫn không được bác à. Bác có thể nói rõ hơn cho em được không? Cảm ơn bác nhiều.

[root@localhost nagios-plugins-1.4.15]# service nagios restart
Running configuration check...done.
Stopping nagios: done.
Starting nagios: done.
[root@localhost nagios-plugins-1.4.15]#
Hi các bác,

Em đang cài Nagios trên Centos gặp lỗi sau khi khởi động:

[root@localhost home]# service nagios restart
Running configuration check...done.
Stopping nagios: done.
Starting nagios:su: warning: cannot change directory to /home/nagios: No such file or directory
done.
[root@localhost home]#

Các bác chỉ giúp em với em đang loay hoay chưa biết cách?
Thanks đại ca nhé. Em xử lý được rồi bác à.
Các bác đã ai cài đặt Redmine chưa? Em đang cài chương trình này nhưng đang bị lỗi sau đây khi tạo Redmine Mysql Database:
[root@localhost local]# mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@localhost local]#

Mong các bác chỉ giùm em. Em đang mày mò nhưng chưa dc. Cảm ơn các bác.
Cảm ơn 2 anh quanta và ikut3 đúng là file em download bị corrupt đã load file khác về chạy ngon lành.
[root@localhost tmp]# tar -zxvf ruby-1.9.2-p180.tar.gz

gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error exit delayed from previous errors

Em giải nén như trên nhưng nó báo lỗi như vậy. Mong các bác chỉ giáo giùm vì tìm trên google các cách giải nén và thử hết cách nhưng không được. Xin cảm ơn.
Thanks các bác đã nhiệt tình chỉ giáo! Một trong 2 card mạng máy ảo đặt chế default gw vào mạng local của mạng ảo là ok.
Các đại ca chỉ giáo giùm em với?!!!
NAT và DHCP
 
Go to Page:  First Page Page 1 Page 3 Last Page

Powered by JForum - Extended by HVAOnline
 hvaonline.net  |  hvaforum.net  |  hvazone.net  |  hvanews.net  |  vnhacker.org
1999 - 2013 © v2012|0504|218|