Home | 簡體中文 | 繁體中文 | 雜文 | 打賞(Donations) | ITEYE 博客 | OSChina 博客 | Facebook | Linkedin | 知乎專欄 | Search | Email

Netkiller Linux Monitoring 手札

Monitoring, Scanner, Sniffer and Audit...

Mr. Neo Chan, 陳景峯(BG7NYT)


中國廣東省深圳市龍華新區民治街道溪山美地
518131
+86 13113668890


2010-11-18

版權聲明

轉載請與作者聯繫,轉載時請務必標明文章原始出處和作者信息及本聲明。

文檔出處:
http://netkiller.github.io
http://netkiller.sourceforge.net

微信掃瞄二維碼進入 Netkiller 微信訂閲號

QQ群:128659835 請註明“讀者”

2017-02-13

內容摘要

本文檔講述Linux系統涵蓋了系統管理與配置包括:

[注意]對初學Linux的愛好者忠告

玩Linux最忌reboot(重新啟動)這是windows玩家壞習慣

Linux只要接上電源你就不要再想用reboot,shutdown,halt,poweroff命令,Linux系統和應用軟件一般備有reload,reconfigure,restart/start/stop...不需要安裝軟件或配置伺服器後使用reboot重新引導計算機

在Linux系統裡SIGHUP信號被定義為刷新配置檔案,有些程序沒有提供reload參數,你可以給進程發送HUP信號,讓它刷新配置檔案,而不用restart.通過pkill,killall,kill 都可以發送HUP信號例如: pkill -HUP httpd

我的系列文檔:

操作系統

Netkiller Linux 手札 Netkiller FreeBSD 手札 Netkiller Shell 手札 Netkiller Security 手札 Netkiller Web 手札 Netkiller Monitoring 手札 Netkiller Storage 手札 Netkiller Mail 手札

以下文檔停止更新合併到 《Netkiller Linux 手札》

Netkiller Debian 手札 Netkiller CentOS 手札 Netkiller Multimedia 手札    

目錄

1. 自述
1.1. 系列文檔
1.2. 作者簡介
1.3. 寫給讀者
1.4. 文檔下載
1.5. 打賞(Donations)
1.5.1. 微信(Wechat)
1.5.2. 支付寶(Alipay)
1.5.3. PayPal Donations
1.5.4. 銀行(Bank)
I. System Monitoring & Utility
1. User
1.1. last, lastb - show listing of last logged in users
2. Memory
2.1. Memory
2.2. vmstat - Report virtual memory statistics
2.3. mpstat
2.4. pmap - report memory map of a process
3. CPU
3.1. uptime - Tell how long the system has been running.
3.2. top - display Linux tasks
3.3. atop - AT Computing's System & Process Monitor
3.4. htop - interactive process viewer
4. Processes
4.1. strace - trace system calls and signals
5. Harddisk IO
5.1. input/output statistics
5.1.1. 5 秒監控一次
5.2. iotop - simple top-like I/O monitor
5.3. ionice - set or get process I/O scheduling class and priority
5.4. smartd - SMART Disk Monitoring Daemon
6. Network IO
6.1. netstat
6.2. ss
6.3. iftop - display bandwidth usage on an interface by host
6.4. iptraf - Interactive Colorful IP LAN Monitor
6.5. nload: Console application which monitors network traffic and bandwidth
6.6. bwm - Bandwidth Monitor
6.7. iptstate - A top-like display of IP Tables state table entries
7. Service
7.1. NFS
7.1.1. nfsstat
7.1.2. nfswatch
7.2. apachetop
8. 檔案監控
9. watchdog
10. nmon
11. Hardware
11.1. temperature/voltage/fan
11.2. mcelog - Decode kernel machine check log on x86 machines
12. SMS
12.1. gnokii
12.1.1. 安裝
12.1.2. 配置
12.1.3. 發送測試短信
12.1.4. 接收短信
12.1.5. 撥打電話
12.2. AT Commands
12.2.1. 發送短信
12.2.2. 語音通話
13. IPMI (Intelligent Platform Management Interface)
13.1. OpenIPMI
13.2. freeipmi
13.2.1. ipmiping
13.2.2. ipmimonitoring
13.2.3. ipmi-sensors
13.2.4. ipmi-locate
13.3. ipmitool - utility for controlling IPMI-enabled devices
13.3.1. ipmitool
13.3.2. sensor
13.3.3. ipmitool shell
13.3.4. ipmitool 訪問遠程主機
13.3.5. Get chassis status and set power state
13.3.6. Configure Management Controller
13.3.7. Example for iDRAC
14. JVM
14.1. jconsole
14.2. jps - Java Virtual Machine Process Status Tool
14.3. jinfo - Configuration Info
14.4. jstat - Java Virtual Machine Statistics Monitoring Tool
14.5. jHiccup
15. NET SNMP (Simple Network Management Protocol)
15.1. 安裝SNMP
15.1.1. Ubuntu
15.1.1.1. snmpd.conf
15.1.1.2. SNMP v3
15.1.2. CentOS
15.1.2.1. Configure SNMPv3 on CentOS or RHEL
15.2. 配置SNMP
15.2.1. community 配置
15.2.2. 定義可操作的範圍
15.3. SNMP 命令
15.3.1. snmpwalk
15.3.2. snmpget
15.3.3. snmptest
15.4. Cisco MBI
15.4.1. Cisco 3750
15.4.2. Cisco ASA 5550
16. Zabbix
16.1. Installing and Configuring Zabbix
16.1.1. Ubuntu
16.1.2. CentOS Zabbix 2.4
16.1.3. Zabbix 3.x CentOS 7
16.2. web ui
16.2.1. 警告腳本
16.3. zabbix-java-gateway - Zabbix java gateway
16.4. zabbix-agent
16.4.1. Ubuntu
16.4.2. CentOS 7
16.4.3. zabbix_agentd 命令
16.4.4. Nginx status 監控
16.4.5. redis
16.4.6. MongoDB
16.4.6.1. 創建 Mongo 監控用戶
16.4.6.2. Zabbix agentd 配置
16.4.6.3. Zabbix server 測試
16.4.7. PHP-FPM
16.4.7.1. 啟用 php-fpm status 功能
16.4.7.2. 配置 nginx
16.4.7.3. 配置 Zabbix 代理
16.4.7.4. php-fpm 監控參數
16.4.8. Elasticsearch
16.4.8.1. 安裝採集腳本
16.4.8.2. 配置Zabbix代理
16.4.9. Postfix
16.4.9.1. 安裝採集腳本
16.4.9.2. userparameter_postfix.conf
16.4.10. TCP stats
16.4.10.1. 採集腳本
16.4.11. 應用依賴檢查
16.4.12. Oracle
16.4.12.1. 採集腳本
16.4.12.2.
17. Cacti
17.1. Install Cacti for Ubuntu
17.2. Yum 安裝
17.3. Source Install
17.4. Web 安裝
17.5. Cacti plugins
17.5.1. Percona monitoring plugins
17.6. Template
17.6.1. Nginx
17.6.2. php-fpm
17.6.3. MySQL
17.6.4. Redis
17.6.5. Percona JMX Monitoring Template for Cacti
18. Nagios
18.1. Install
18.1.1. Nagios core
18.1.2. Monitor Client nrpe
18.1.3. Monitoring Windows Machines
18.1.4. PNP4Nagios 圖表插件
18.2. nagios
18.3. nrpe node
18.4. 配置 Nagios
18.4.1. authorized
18.4.2. contacts
18.4.3. hostgroups
18.4.4. generic-service
18.4.5. SOUND OPTIONS
18.4.6. SMS 短信
18.4.7. nrpe plugins
18.5. 配置監控設備
18.5.1. routers
18.5.2. host
18.5.3. service
18.5.3.1. http
18.5.3.2. mysql hosts
18.5.3.3. check_tcp
18.6. Nagios Plugins
18.6.1. check_ping
18.6.2. check_procs
18.6.3. check_users
18.6.4. check_http
18.6.5. check_mysql
18.6.5.1. check_mysql
18.6.5.2. mysql.cfg check_mysql_replication
18.6.5.3. nrpe.cfg check_mysql_replication
18.6.6. Disk
18.6.6.1. disk.cfg
18.6.6.2. check_disk
18.6.6.3. disk-smb.cfg
18.6.7. check_tcp
18.6.7.1. 連接埠檢查
18.6.7.2. Memcache
18.6.7.3. Redis
18.6.8. check_log
18.6.9. check_traffic
18.6.10. Nagios nrpe plugins
18.6.11. check_nt
18.6.12. nsca - Nagios Service Check Acceptor
18.6.13. jmx
18.7. FAQ
18.7.1. Macro Name
18.7.2. 插件開發手冊
19. ElasticSearch + Logstash + Kibana
19.1. ElasticSearch + Logstash + Kibana 安裝
19.1.1. ElasticSearch 安裝
19.1.2. Kibana 安裝
19.1.3. Logstash 安裝
19.2. 本地檔案
19.3. TCP/UDP
19.4. 配置 Broker(Redis)
19.4.1. indexer
19.4.2. shipper
19.5. Kafka
19.6. logstash 配置項
19.6.1. input
19.6.2. filter
19.6.3. output
19.6.3.1. elasticsearch
19.7. Beats
19.8. FAQ
19.8.1. 查看 Kibana 資料庫
19.8.2. logstash 無法寫入 elasticsearch
19.8.3. 標準輸出
20. Logs 分析
20.1. log
20.1.1. logwatch
20.1.2. logcheck : Analyzes log files and sends noticeable events as email
20.1.3. nulog
20.2. Web
20.2.1. Apache Log
20.2.1.1. 刪除日誌
20.2.1.2. 統計爬蟲
20.2.1.3. 統計瀏覽器
20.2.1.4. IP 統計
20.2.1.5. 統計域名
20.2.1.6. HTTP Status
20.2.1.7. URL 統計
20.2.1.8. 檔案流量統計
20.2.1.9. URL訪問量統計
20.2.1.10. 腳本運行速度
20.2.1.11. IP, URL 抽取
20.2.2. awstats
20.2.2.1. 語言
20.2.2.2. 輸出HTML文檔
20.2.2.3. 多站點配置
20.2.2.4. 合併日誌
20.2.2.5. Flush history file on disk (unique url reach flush limit of 5000) 優化
20.2.2.6. JAWStats
20.2.3. webalizer
20.2.3.1. 手工生成
20.2.3.2. 批量處理歷史數據
20.2.3.3. crontab
20.2.4. Sarg - Squid Analysis Report Generator
20.2.5. goaccess - Fast web log analyzer and interactive viewer.
20.3. Tomcat
20.3.1. 截取 0-3 點區間的日誌
20.3.2. 監控Redis
20.4. Mail
20.4.1. pflogsumm.pl - Produce Postfix MTA logfile summary
20.5. OpenSSH 日誌 /var/log/secure
20.5.1. 查看登陸用戶
20.6. rinetd.log
20.7. php-syslog-ng
20.8. Log Analyzer
20.9. Splunk
20.10. Octopussy
20.11. eventlog-to-syslog
20.12. Apache Flume
21. MRTG
21.1. Ubuntu 安裝
21.2. CentOS 安裝
21.3. 監控多個設備
21.4. 批量生成監控配置檔案
21.5. 圖片尺寸
22. Munin
22.1. Ubuntu
22.1.1. Installation Monitor Server
22.1.2. Installation Node
22.1.3. Additional Plugins
22.1.4. plugins
22.1.4.1. mysql
22.1.4.2. apache
22.2. CentOS
22.3. 用戶認證
22.4. munin-node and plugins
22.4.1. munin-node.conf
22.4.2. mysql plugin
22.4.3. apache plugin
22.4.4. memcached plugin
22.5. munin.conf
22.6. munin-node
22.6.1. munin-node.conf
23. Ntop
23.1. Installation
23.1.1. Ubuntu
23.1.2. CentOS
23.2. Web UI
23.3. Plugins
23.3.1. NetFlow
24. Bandwidth
24.1. apt-get install
24.2. CentOS rpm/yum
24.3. source code
24.4. /etc/bandwidthd.conf
25. NetFlow
25.1. flow-tools - collects and processes NetFlow data
25.1.1. flow-capture
25.1.2. NetFlow into MySQL with flow-tools
25.2. netams - Network Traffic Accounting and Monitoring Software
25.2.1. netams-web
26. Ganglia
26.1. Server
26.2. Client
26.3. Plugin
26.4. Installing Ganglia on Centos
27. lvs-rrd
28. Observium
28.1. Installation
29. OpenTSDB
30. Graphite
31. Graphite - Scalable Realtime Graphing
32. BIG BROTHER
33. Big Sister
34. OpenNMS
35. Performance Co-Pilot
36. Clumon Performance Monitor
37. Zenoss
38. 商業軟件
39. Hyperic HQ
40. OSSIM,Spiceworks,FireGen,LANSweeper,OSSEC,HIDS
41. HawtIO
42. moloch
43. Varnish Dashboard

範例清單

10.1. nmon
16.1. zabbix-agent 配置實例
17.1. cacti config.php
18.1.
20.1. config.php
21.1. mrtg

1. icinga

https://www.icinga.org/