2016/12/9
http://www.blogjava.net/DLevin/archive/2015/04/30/424799.html
在上面留言之後,發現自己根本沒那個能力分析
還是來簡述一下
1.小封包的PING
2.大封包的PING
3.icmp的PING
4.路徑長短(tracert route)
5.CDN的認識
6.ICMP、TCP、UDP的優先權
缺少各地PING的資料
不知道何時才能完成此份文章....OTZ
2019/1/30更新:
當時想到的,是在你國裡面,連線的資料一定會被污染
從DNS污染、憑證污染、連線內容污染......等,都是被監控的對象
所以用ICMP來測試速度,並不能代表實際效果
另外,如果是對外服務,要追求使用者回應速度,就要考慮CDN,加快客戶端取用資料的速度
對內,就內部VPN直接對聯就好
2015/10/21
cacti with SELinux
From:
http://docs.cacti.net/manual:087:1_installation.1_install_unix.8_selinux
SELinux Settings
SELinux setting greatly depend on which exact setup you are running.
E.g. when installing Cacti into /var/www/html/cacti (which is the
default installation location), the web server httpd usually has the
required permissions to execute as required. But when e.g. installing
into a private directory, e.g. ~/mycacti, you will have to provide
specific SELinux settings.
Global SELinux Settings
This is an excerpt from my personal settings when installing into
private directory. Any or all of them may be obsolete, when using the
default location. Use -P option to make the change permanent
/usr/sbin/setsebool -P httpd_read_user_content=1 /usr/sbin/setsebool -P httpd_tty_comm=1 /usr/sbin/setsebool -P httpd_can_network_connect=1 /usr/sbin/setsebool -P httpd_builtin_scripting=1 /usr/sbin/setsebool -P httpd_enable_homedirs=1 /usr/sbin/setsebool -P httpd_enable_cgi=1
SELinux Settings for Plugins
BOOST
In case you are using BOOST server network setup, it was reported that/usr/sbin/setsebool -P httpd_can_network_connect=1
chcon -R -t httpd_sys_content_t /usr/share/cacti/
<==這句最重要
2015/5/11
推薦!國外程序員整理的系統管理員資源大全 - 博客 - 伯樂在線 http://blog.jobbole.com/83212/
自己留存被查
FROM :推薦!國外程序員整理的系統管理員資源大全 - 博客 - 伯樂在線 http://blog.jobbole.com/83212/
內容分類包括:備份/克隆軟件、云計算/云存儲、協作軟件、配置管理、日誌管理、監控、項目管理…… 當然也有系統管理員相關書籍。
FROM :推薦!國外程序員整理的系統管理員資源大全 - 博客 - 伯樂在線 http://blog.jobbole.com/83212/
推薦!國外程序員整理的系統管理員資源大全
受其他程序員彙編 PHP 資源,kahun 在 Github 發起系統管理員相關的開源資源整理。內容分類包括:備份/克隆軟件、云計算/云存儲、協作軟件、配置管理、日誌管理、監控、項目管理…… 當然也有系統管理員相關書籍。
備份
備份軟件- Amanda -客戶端-服務器模型備份工具
- Bacula - 另一個客戶端-服務器模型備份工具
- Backupninja -輕量級,可擴展的元數據備份系統
- Backuppc -客戶端-服務器模型備份工具和文件共享方案。
- Burp -網絡備份和還原程序
- Duplicity -使用rsync算法加密的帶寬-效率備份
- Lsyncd -監控一個本地目錄樹的變化,然後產生一個進程去同步變化。默認使用rsync。
- Rsnapshot -文件系統快照工具
- SafeKeep -使用rdiff-backup,集中的,基於pull的備份
- TarSnap - 具有一個開源客戶端的安全備份服務
- UrBackup -另一個客戶端-服務器備份系統
- DREBS - AWS EBS支持策略的備份腳本
克隆
克隆軟件- Clonezilla -分區和磁盤鏡像/克隆程序
- Fog - 另一個計算機克隆解決方案
- Redo Backup -簡單的備份,恢復和還原
云計算
- AppScale – 兼容Google App引擎的開源云計算軟件.
- Archipel -使用Libvirt管理和監視虛擬機
- CloudStack -創建,管理和部署基礎云服務的云計算軟件
- Cobbler -Cobbler是一個Linux安裝服務器,允許快速地構建網絡安裝環境
- Eucalyptus -兼容AWS的開源私有云軟件
- Mesos -開發和運行能效高的分佈式系統。
- OpenNebula -一個用於系統管理員和研發運維的用戶驅動的云管理平台
- OpenStack -構建私有和開放云的開源軟件
- The Foreman -Foreman是一個用於物理和虛擬服務器的全生命週期管理工具.FOSS.
云業務流程
- BOSH -IaaS業務流程平台,最初用於部署和管理云計算平台PaaS,但也用於通用的分佈式系統。
- Cloudify -使用Python和YAML編寫的開源TOSCA-based云業務流程軟件平台。
- Juju -云業務流程工具用於管理服務,比如charms,YAML配置和部署腳本集
- MCollective -來自Puppet實驗室的管理服務器業務流程和開發的Ruby框架
- Overcast -在不同的云提供商上部署VMs,並在任何或所有(VM)上通過SSH並行運行命令行和腳本
- Rundeck - 簡單的業務流程工具
- Salt -Python編寫
云存儲
- git-annex assistant -在你的每一個OSX和Linux電腦,Android設備,可移動驅動,NAS電器和云服務上一個同步文件夾
- ownCloud -提供你的文件的統一訪問,通過web,你的電腦和你的移動設備
- Seafile -另一個開源的云存儲解決方案
- SparkleShare -提供云存儲和文件同步服務。它默認使用Git作為存儲後端
- Swift -一個高可用,分佈式,最終一致的對象/大數據存儲
- Syncthing -一個用於私有,加密和身份認證數據的開源系統
代碼審查
基於Web的協作式代碼審查系統- Gerrit -基於Git版本控制,它促進軟件開發人員審查源代碼修改和批准或拒絕這些變更。
- Review Board - 基於MIT License的可用自由軟件
協作軟件
協作軟件和群件套件- Citadel/UX -協同套件(消息和群件)繼承於Citadel家族程序
- EGroupware -PHP編寫的群件軟件
- Horde Groupware -基於PHP的協作軟件套件,包括郵件,日曆,wiki,時間跟蹤和文件管理
- Kolab - 另一個群件套件
- SOGo - 協作軟件服務器,專注簡單性和可伸縮性
- Zimbra -協作軟件套件,包括郵件服務和web客戶端
配置管理數據庫
配置管理數據庫(CMDB)軟件- i-doit - 開源的IT文檔管理和CMDB
- iTop -一個完全開源的,ITIL,基於web的服務管理工具
- Ralph -用於大型數據中心或較小本地網絡的資產管理,DICM和CMDB系統
- Clusto -幫助跟蹤你的庫存,在哪,如何連接,同時提供一個和基礎架構元素交互的抽象接口
配置管理
配置管理工具- Ansible -Python編寫的,通過SSH管理節點
- CFEngine -輕量級代理系統。通過申明語言配置狀態。
- Chef -Rbuy和Erlang編寫,使用純RubyDSL
- Fabric - Python庫和cli工具,為應用程序部署或系統管理任務簡化使用SSH。
- Pallet -通過Clojure DSL進行架構定義,配置和管理
- Puppet - Ruby編寫,使用Puppet聲明語言或Rbuy DSL
- Salt - Python編寫
- Slaughter - Perl編寫
持續繼承和持續部署
持續集成/部署軟件- Buildbot - 基於Python的持續集成工具
- Drone - 構建在Docker,使用YAML文件配置的的持續集成服務器
- GitLab CI -基於rbuy。他們也提供GitLab用於管理git存儲庫
- Go - 開源的持續交付服務器
- Jenkins - 一個可擴展的開源持續集成服務器
- Vlad the Deployer -自動化部署
分佈式文件系統
網絡分佈式文件系統- OpenAFS -只讀副本和多操作系統支持的分佈式網絡文件系統
DNS
DNS服務器- Bind -最廣泛使用的域名服務軟件
- djbdns -DNS應用集合,包括tinydns
- Designate - DNS REST API,支持多種DNS服務器的後端
- dnsmasq -為小規模網絡提供DNS,DHCP和TFTP服務的輕量級服務
- Knot - 高性能,權威的DNS服務器
- NSD - 權威的、高性能的、簡單的域名服務器。
- PowerDNS -具有各種數據存儲後端和負載平衡功能的DNS服務器。
- Unbound - 驗證、遞歸和緩存DNS解析器。
- Yadifa - 具有DNSSEC兼容的輕量級的權威域名服務器,支持.eu的頂級域名。
主機控制面板
Web主機控制面板- Ajenti -Linux和BSD控制面板
- Feathur - VPS供應和管理軟件
- ISPConfig -Linux主機控制面板
- VestaCP -用於Linux和Nginx的主機面板
- Virtualmin -基於webmin的Linux控制面板
- ZPanel -Linux BSD和Windows控制面板
IMAP/POP3
IMAP/POP3郵件服務器- Courier IMAP/POP3 -快速,可伸縮,企業級IMAP和POP3服務器
- Cyrus IMAP/POP3 -運行在密封服務器上,普通用戶不允許登錄。
- Dovecot -主要考慮安全而編寫的IMAP和POP3服務器
- Qpopper - 一個古老且流行的POP3服務器實現
IT資產管理
IT資產管理軟件- GLPI -帶有額外管理接口的信息資源管理器
- OCS Inventory NG -允許用戶清算IT資產
- RackTables -數據中心和服務器房間資產,比如將硬件資產,網絡地址,在貨架空間,網絡配置文檔化。
- Ralph - 針對大型數據中心系統以及小型局域網網絡的資產管理、DCIM和CMDB。
- Snipe IT -資產和許可證管理軟件
LDAP
LDAP服務器- 389 Directory Server - 通過Red Hat部署
- Apache Directory Server -用Java編寫的Apache軟件基金會項目
- Fusion Directory -基於OpenLDAP改善服務和公司目錄的管理
- OpenDJ - OpenDS分支
- OpenDS -另一個用Java編寫的目錄服務器
- OpenLDAP -由OpenLDAP項目開發
日誌管理
日誌管理工具:收集,解析,可視化- Elasticsearch - 一個基於Lucene的文檔存儲,主要用於日誌索引、存儲和分析。
- Fluentd - 日誌收集和發出
- Flume -分佈式日誌收集和聚合系統
- Graylog2 -具有報警選項的可插入日誌和事件分析服務器
- Heka -流處理系統,可用於日誌聚合
- Kibana - 可視化日誌和時間戳數據
- Logstash -管理事件和日誌的工具
- Octopussy -日誌管理解決方案(可視化/報警/報告)
監控
監控軟件- Cacti -基於Web的網絡監控和圖形工具
- Cabot - 監控和報警,類似PagerDuty
- check_mk -Nagios的擴展集合
- Dash -一個用於GNU/Linux機器的低開銷web儀表板監控。
- Icinga - Nagios分支
- LibreNMS - Observium分支
- Monit - 管理和監控Unix系統的小型開源工具
- Munin -網絡資源監控工具
- Naemon -基於Nagios4內核的網絡監控工具,具有性能加強和新功能
- Nagios -計算機系統,網絡和基礎架構監控軟件
- Observium -服務器和網絡設備的SNMP監控,運行在linux
- OMD -開放的監控分佈
- Opsview -基於Nagios4,Opsview核心,用於小型IT和測試環境
- Riemann -靈活和快速的事件處理器,允許負責時間和度量分析
- Sensu -開源的監控框架
- Sentry - 應用監控,事件記錄和聚合
- Shinken - 另一個監控框架
- Thruk - 多後台監控的web接口,支持Naemon,Nagios,Icinga和Shinken
- Xymon -靈感來自Big Brother的網絡監控
- Zabbix - Enterprise-class software for monitoring of networks and applications.
- Zabbix - 監控網絡和應用的企業級軟件
- Zenoss -基於Zope的應用,服務器和網絡管理平台
度量和度量收集
度量收集和顯示軟件- Collectd -系統統計收集守護進程
- Collectl -高精度系統性能指標收集工具。
- Dashing -Ruby gem,允許快速統計儀表板的開發。基於HTML5,允許在數據中心或會議室進行大屏幕顯示。
- Diamond -基於Python的統計收集守護進程
- Ganglia - 基於RRD用於網格和/或集群的服務器的高性能、可伸縮監控設備。兼容Graphite,使用一個單一的收集進程。
- Grafana -一個Graphite或InfluxDB儀表盤和圖形編輯器
- 開源的可伸縮繪圖服務器
- InfluxDB -開源的分佈式時間序列數據庫,沒有外部依賴。
- KairosDB -快速分佈式可擴展的時間序列數據庫,OpenTSDB 1. x的分支。
- OpenTSDB -存儲和服務大量的時間序列數據,不丟失粒度。
- RRDtool - 開源企業標準,用於時間序列數據的高性能數據記錄和繪圖系統
- Statsd -應用統計監聽
網絡配置管理
網絡配置管理工具時事通訊
時事通訊軟件NOSQL
NOSQL數據庫- 列族
- Apache HBase - Hadoop數據庫,一個分佈式的大數據存儲
- Cassandra -分佈式數據庫管理系統,設計用於處理大量數據跨多個服務器。
- Hypertable -基於c++的bigtable DBMS,節省通信,可獨立或在Hadoop類似的分佈式FS上運行。
- 文檔存儲
- CouchDB -易於使用,多主機複製的面向文檔的數據庫系統。
- ElasticSearch - 基於Java的數據庫,受歡迎的日誌聚合,和電子郵件歸檔項目。
- MongoDB - 另一個面向文檔的數據庫系統
- RavenDB - 具有ACID/事物功能的基於文檔的數據庫
- RethinkDB -開源分佈式文檔存儲數據庫,關注JSON
- 圖
- 鍵值
打包
- fpm - 萬能的多格式包創建器
- omnibus-ruby - 全棧,跨發行版的包管理軟件(Ruby)
- packman -全棧,跨發行版的包管理軟件(Python)
- tito - 為git項目構建RPM
隊列
- BeanstalkD - A simple, fast work queue.
- BeanstalkD - 一個簡單快速的工作隊列
- Gearman -快速的多語言隊列或任務處理平台
- NSQ - 實時分發的消息平台
- RabbitMQ -健壯的,全功能,跨發行版的隊列系統
- ZeroMQ -輕量級隊列系統
RDBMS
關係數據庫管理系統- Firebird - 真正的全球開源數據庫
- Galera -Galera MySQL集群是一個易於使用的高可用性解決方案,具有很高的系統正常運行時間,沒有數據丟失,為未來的增長提供可伸縮性。
- MariaDB -MySQL的社區開發分支
- MySQL - 非常流行的RDBMS服務器
- Percona Server -增強的,可替換MySQL
- PostgreSQL - 對象關係數據庫管理系統(ORDBMS)
- PostgreSQL-XL - 基於PostgreSQL的可伸縮開源數據庫集群
- SQLite -自包容,弱服務器,零配置,支持事務的SQL DBS實現庫
安全
安全工具- Denyhosts -阻止SSH字典攻擊和暴力攻擊
- Fail2Ban - 掃瞄日誌文件,並對具有惡意行為顯示的IP採取措施
- SpamAssassin -一個強大的和受歡迎的垃圾郵件過濾器,它採用多種檢測技術。
服務發現
- Consul - Consule是伊戈爾服務發現,監控和配置的工具
- Doozerd - Doozer是一個高可用,完全一致的存儲,用於少量非常重要的數據
- ZooKeeper - ZooKeeper是一個集中的服務,用於維護配置信息,命名,提供分佈式同步和組服務
SMTP
SMTP服務器- Exim -由劍橋大學開發的消息傳輸代理(MTA)
- Haraka - 用JavaScirpt編寫的高性能,可插入的SMTP服務器
- MailCatcher -Ruby gem部署一個簡單的SMTP MTA網關,接收所有郵件並在web接口顯示。對調試和開發有用。
- Maildrop -開源的一次性郵件服務器,對開發也很有用
- OpenSMTPD -從OpenBSD項目實現的安全的SMTP服務器
- Postfix - 快速,易於管理和安全的Sendmail替代品
- Qmail - 安全的Sendmail替代品
- Sendmail -消息傳輸代理(MTA)
軟件容器
操作系統級別的虛擬化- Bitnami -為web應用,開發棧和虛擬設備生產開源軟件安裝器或軟件包
- Docker - 給開發者和系統管理員構建,發佈和運行分佈式應用程序的開放平台
- OpenVZ -Linux平台基於容器的虛擬化
SSH
SSH工具- autossh -網絡中斷後自動復位ssh會話。
- Cluster SSH -通過一個圖形化控制台控制多個xterm窗口。
- DSH -Dancer的shell/分佈式shell-從一個命令行包裝執行多個遠程shell命令。
- Mosh - 移動shell
- parallel-ssh -提供並行的OpenSSH版本和相關工具
- SSH Power Tool -不使用pre-shared鑰匙的情況下對多個服務器同時執行命令和上傳文件
統計
分析軟件- Analog - 世界上最流行的日誌分析工具
- GoAccess -在終端運行的開源的實時web日誌分析和交互視圖
- Piwik -免費和開源的web分析應用
- Webalizer - F快速免費的web服務器日誌文件分析程序
工單系統
基於web的工單系統- Bugzilla -由Mozilla項目開發和使用過的通用缺陷跟蹤和測試工具
- Cerb - 基於商業開源許可的基於組的郵件管理項目
- Flyspray - 使用PHP編寫的缺陷跟蹤系統
- MantisBT -另一個基於web的缺陷跟蹤系統
- osTicket -開源的技術支持工單系統
- Otrs -免費和開源故障通知單系統軟件包,公司,組織,或其他實體可以使用它來基於詢問分配工單並跟蹤進一步的溝通。
- Request Tracker -使用Perl編寫的工單跟蹤系統
- TheBugGenie -開源的工單系統,具有非常完備的用戶權限分配
故障排除
故障排除工具- mitmproxy -ython工具,用於攔截,查看和修改網絡流量。在排除某些問題是非常重要的。
- Sysdig -從一個運行的linux實例上捕獲系統狀態和活動,之後保存,過濾和分析
- Wireshark -世界上著名的網絡協議分析工具
項目管理
基於web的項目管理和缺陷跟蹤系統- ChiliProject - Redmine分支
- GitBucket 用Scala編寫的GitHub的克隆,單獨jar安裝
- GitLab -用Rbuy編寫的GitHub的克隆
- Gogs -用Go編寫
- OpenProject -開源的項目協作項目
- Phabricator PHP編寫
- Redmine - 基於rails在rbuy編寫
- The Bug Genie -PHP編寫
- Trac -python編寫
版本控制
軟件版本和版本控制- Fossil -分佈式版本控制,內建wiki和缺陷跟蹤
- Git -速度很快的分佈式版本控制和源代碼管理
- GNU Bazaar -由Cannoicalzi贊助的分佈式版本控制系統
- Mercurial -另一個版本控制
- Subversion -客戶端-服務器版本控制系統
虛擬化
虛擬化軟件- Ganeti -在KVM和Xen上構建的集群虛擬服務器管理軟件
- KVM -Linux內核虛擬化架構
- oVirt -管理虛擬機,存儲和虛擬網絡
- Packer - 從單個源配置為多個平台創建相同的機器鏡像
- Vagrant - 創建完整開發環境的工具
- VirtualBox -來自Oracle公司的虛擬化產品
- Xen -用於32/64位Intel/AMD(IA 64)和PowerPC 970架構的虛擬機監控器
VPN
VPN軟件- OpenVPN -使用一個定製的安全密鑰交換協議,利用SSL / TLS。
- Pritunl -基於OpenVPN的方案,易於設置
- SoftEther - 具有高級特性的多協議VPN軟件
- sshuttle -窮人的VPN
- strongSwan - Linux下完整的IPsec實現
- tinc -分佈式點對點VPN
XMPP
XMPP服務器- ejabberd -用Erlang/OTP編寫的XMPP短信服務器
- Metronome IM -Prosody IM分支
- MongooseIM -ejabberd分支
- Openfire -實時協作(RTC)服務器
- Prosody IM -Lua編寫的XMPP服務器
- Tigase -java實現的XMPP服務器
Webmails
Webmail應用- Mailpile - A modern, fast web-mail client with user-friendly encryption and privacy features.
- Mailpile - 一個先進,快速的web-mail客戶端,具有用戶友好的加密的私有個性
- Roundcube - Browser-based IMAP client with an application-like user interface.
- Roundcube - 基於瀏覽器的IMAP客戶端,具有應用類似的用戶界面
Web
Web服務器- Apache -最流行的web服務器
- Cherokee -輕量級,高性能的web服務器/反向代理
- Lighttpd - speed-critical環境下更優化的web服務器
- Nginx -反向代理,負載均衡器,HTTP緩存和web服務器
- uWSGI -uWSGI項目,目標在開發一個構建主機服務的全棧
Wikis
Wiki軟件- DokuWiki -使用簡單和高度通用的wiki,這並不需要一個數據庫。
- Gollum - 一個簡單,Git-powered wiki,具有不錯的API和本地前端。
- ikiwiki -一個wiki編譯器
- Mediawiki -加強Wikipedia
- MoinMoin -一個高級的易用的擴展性強的Wiki引擎,具有大量的社區用戶TiddlyWiki - JavaScript的完整交互wiki
- Ōlelo Wiki - 在Git存儲上保存頁面的wiki
資源
各種資源,比如書籍,網站和文章,用於提升技能和知識博客
- Code as Craft - Etsy的運維博客,大量的技術博客
- DevOpsGuys - Devops顧問,運維博客
- Rackspace Developers -具有大量Devops主題的博客
書籍
Sysadmin相關書籍- The Linux Command Line - William Shotts的書,關於Linux命令行
- The Phoenix Project: A Novel about IT, DevOps, and Helping Your Business Win -DevOps技術如何修復發生在IT組織的問題
- The Practice of System and Network Administration - 第一和第二版本描述系統和網絡管理的最佳實踐,獨立於特定平台或技術。
- The Visible Ops Handbook: Implementing ITIL in 4 Practical and Auditable Steps -一個方法論,旨在啟動實施控制和過程改進。
- UNIX and Linux System Administration Handbook - 從使用的角度走進系統管理
編輯器
開源的代碼編輯器- Atom -來自Github的文本編輯器
- Brackets - 用於web設計和前端開發的開源代碼編輯器
- Eclipse - 用Java編寫的IDE,具有可擴展的插件系統
- Geany -GTK2文本編輯器
- GNU Emacs -一個可擴展,自定義的文本編輯器
- Haroopad -Markdown編輯器,具有實時預覽
- ICEcoder -非常棒的代碼編輯器,內建常見的web語言
- jotgit -Git支持的實時協作代碼編輯
- Light Table - 下一代代碼編輯器
- Lime -旨在提供一個Sublime Text的開源替代方案
- TextMate -OS X下的圖形文本編輯器
- Vim -一個高可配置的文本編輯器,用於高效編輯
時事通訊
- Servers for Hackers - 程序員的時事通訊,發現他們需要知道的服務器相關內容。
存儲
軟件包存儲網站
有用的系統管理員相關的網站- Ops School - 全面的計劃,將幫助你成為一名運維工程師。
- Digital Ocean Tutorials - 一個非常龐大資源,獲得基本的應用程序,工具,甚至是系統管理主題。
貢獻
請看 貢獻詳情關於作者: cucr
2015/4/29
Sendmail, Spamassassin, ClamAV statistics in cacti on CentOS 6 ver 1--draft
Draft...........................................until into work
still a draft,Might finish in one day
from:http://forums.cacti.net/about38434.html
exec .1.3.6.1.4.100.2.101.1 maillog_received /opt/maillog_watcher/maillog_watcher_read.sh received
exec .1.3.6.1.4.100.4.101.1 maillog_sent /opt/maillog_watcher/maillog_watcher_read.sh sent
exec .1.3.6.1.4.100.5.101.1 maillog_virus /opt/maillog_watcher/maillog_watcher_read.sh virus
exec .1.3.6.1.4.100.6.101.1 maillog_spam /opt/maillog_watcher/maillog_watcher_read.sh spam
exec .1.3.6.1.4.100.7.101.1 maillog_rejected /opt/maillog_watcher/maillog_watcher_read.sh rejected
What I did was renaming the standard snmpd.conf to snmpd.conf.old
then creating a new one with only "rocommunity public <ip>"
another message about cacti:
http://tosian.blogspot.tw/2008/08/snmp-on-linux-server.html
still a draft,Might finish in one day
from:http://forums.cacti.net/about38434.html
Installation:change to:
1) compile the source using:
Code:gcc -o maillog_watcher maillog_watcher.c -lpthread
2) move the executable and the maillog_watcher_read.sh file to /opt/maillog_watcher/
3) add the following lines to your snmpd.conf
Code:exec .1.3.6.1.4.100.2 maillog_received /opt/maillog_watcher/maillog_watcher_read.sh received
exec .1.3.6.1.4.100.4 maillog_sent /opt/maillog_watcher/maillog_watcher_read.sh sent
exec .1.3.6.1.4.100.5 maillog_virus /opt/maillog_watcher/maillog_watcher_read.sh virus
exec .1.3.6.1.4.100.6 maillog_spam /opt/maillog_watcher/maillog_watcher_read.sh spam
exec .1.3.6.1.4.100.7 maillog_rejected /opt/maillog_watcher/maillog_watcher_read.sh rejected
exec .1.3.6.1.4.100.2.101.1 maillog_received /opt/maillog_watcher/maillog_watcher_read.sh received
exec .1.3.6.1.4.100.4.101.1 maillog_sent /opt/maillog_watcher/maillog_watcher_read.sh sent
exec .1.3.6.1.4.100.5.101.1 maillog_virus /opt/maillog_watcher/maillog_watcher_read.sh virus
exec .1.3.6.1.4.100.6.101.1 maillog_spam /opt/maillog_watcher/maillog_watcher_read.sh spam
exec .1.3.6.1.4.100.7.101.1 maillog_rejected /opt/maillog_watcher/maillog_watcher_read.sh rejected
4) for logrotate to work, modify your /etc/logrotate.d/syslog file to send a HUP signal to maillog_watcher. mine looks like this:
Code:/var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron {
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
/bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true
/bin/kill -HUP `cat /var/run/maillog_watcher.pid 2> /dev/null` 2> /dev/null || true
endscript
}
5) You can now start the maillog_watcher
| Attachments: |
| File comment: maillog_watcher_read.sh file used to read the stats Downloaded 196 times |
| File comment: maillog_watcher source file Downloaded 209 times |
| File comment: maillog_watcher graph and data templates Downloaded 167 times |
SNMP Get interface "End of MIB" ?
vi /etc/snmp/snmpd.confWhat I did was renaming the standard snmpd.conf to snmpd.conf.old
then creating a new one with only "rocommunity public <ip>"
another message about cacti:
http://tosian.blogspot.tw/2008/08/snmp-on-linux-server.html
Postfix status in cacti using CentOS6.6--with SElinux allow perl Script
from:
http://forums.cacti.net/viewtopic.php?f=12&t=6657
http://tosian.blogspot.tw/2008/08/snmp-on-linux-server.html
http://linux.die.net/man/8/snmpd_selinux
https://access.redhat.com/solutions/892923
=================================================================================================
洋蔥爸的工作雜記:SNMP on LINUX server 實作
1.首先找一下 com2sec notConfigUser default public 這一段,然後改成如下所示:(其中 10.16.25.25 是 SNMP server 的 IP address)
#com2sec notConfigUser default public2. 再來是找 group notConfigGroup v1 notConfigUser 這一段,然後改成如下所示:
com2sec local localhost public
com2sec mynetwork 10.16.25.25 public
#group notConfigGroup v1 notConfigUser3. 接著是找 view all included .1 80 這一段,然後改成如下所示:(把前面的 # 去掉)
#group notConfigGroup v2c notConfigUser
group MyRWGroup v1 local
group MyRWGroup v2c local
group MyROGroup v1 mynetwork
group MyROGroup v2c mynetwork
## incl/excl subtree mask4. 找到 #access MyROGroup "" any noauth 0 all none none 這一段,改成如下所示:
view all included .1 80
#access MyROGroup "" any noauth 0 all none none5. 再找一下 syslocation Unknown (configure /etc/snmp/snmp.conf)這一段,改成如下所示:(其中 syslocation 用來告知你機器所在的位置)
#access MyRWGroup "" any noauth 0 all all all
access MyROGroup "" any noauth prefix all none none
access MyRWGroup "" any noauth prefix all all all
syslocation GangShan
syscontact Root (configure /etc/snmp/snmp.local.conf)
=================================================================================================
from:Walkthrough on Postifx monitoring with Cacti
download:http://forums.cacti.net/download/file.php?id=4091
Installation:
1) Configure SNMP agent on Mail server and make sure it is set up right.
2) Unzip fetch_mail_statistics.pl script in place of your choice. (I used /usr/local/bin)
3) Check that your perl path in script points to perl executable
4) Add following line in snmpd.conf file
Code:pass .1.3.6.1.4.1.2021.255 /usr/local/bin/fetch_mail_statistics.pl /var/log/mail.log /var/log/mailstats.db .1.3.6.1.4.1.2021.255
5) Adjust your maillog filename and path corresponding to your system. mailstats.db are used for internal script data storage, place it anywhere.
6) Import template in cacti.
==================================================================================================
in /var/log/audit/audit.log:
type=AVC msg=audit(1430250421.774:158725): avc: denied { read } for pid=22972 comm="fetch_mail_stat" name="maillog" dev=dm-0 ino=1444277 scontext=unconfined_u:system_r:snmpd_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=fileHOW DO I FIX(SKIP) this security Deny?
type=SYSCALL msg=audit(1430250421.774:158725): arch=c000003e syscall=2 success=no exit=-13 a0=1813590 a1=0 a2=1b6 a3=7f65bb021d50 items=0 ppid=2219 pid=22972 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=21015 comm="fetch_mail_stat" exe="/usr/bin/perl" subj=unconfined_u:system_r:snmpd_t:s0 key=(null)
type=AVC msg=audit(1430250421.781:158726): avc: denied { read } for pid=22973 comm="fetch_mail_stat" name="maillog" dev=dm-0 ino=1444277 scontext=unconfined_u:system_r:snmpd_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=file
Let's find the GOOGLE (YA!....... )
=================================================================================================
from SELinux denial when running a script from snmp.conf that needs to create files in the /var/log/ directory
=================================================================================================
- The snmpd process only has access to files in /var/log labeled snmpd_log_t. The fix is to label the the file it needs to access correctly
- If its a single file then change the label on the file it needs to access. If its multiple files, then put these files in the /var/log/snmpd directory
# chcon -t snmpd_log_t /path/to/file
from:snmpd_selinux(8) - Linux man page
Process Types
SELinux defines process types (domains) for each process running on the system
You can see the context of a process using the -Z option to ps
Policy governs the access confined processes have to files. SELinux snmpd policy is very flexible allowing users to setup their snmpd processes in as secure a method as possible.
The following process types are defined for snmpd:
snmpd_t
Note: semanage permissive -a snmpd_t
can be used to make the process type snmpd_t permissive. Permissive process types are not denied access by SELinux. AVC messages will still be generated.
File Contexts
SELinux requires files to have an extended attribute to define the file type.
You can see the context of a file using the -Z option to ls
Policy governs the access confined processes have to these files. SELinux snmpd policy is very flexible allowing users to setup their snmpd processes in as secure a method as possible.
The following file types are defined for snmpd:
snmpd_exec_t
- Set files with the snmpd_exec_t type, if you want to transition an executable to the snmpd_t domain.
snmpd_initrc_exec_t
- Set files with the snmpd_initrc_exec_t type, if you want to transition an executable to the snmpd_initrc_t domain.
snmpd_log_t
- Set files with the snmpd_log_t type, if you want to treat the data as snmpd log data, usually stored under the /var/log directory.
snmpd_var_lib_t
- Set files with the snmpd_var_lib_t type, if you want to store the snmpd files under the /var/lib directory.
snmpd_var_run_t
- Set files with the snmpd_var_run_t type, if you want to store the snmpd files under the /run directory.
Note: File context can be temporarily modified with the chcon command. If you want to permanently change the file context you need to use the semanage fcontext command. This will modify the SELinux labeling database. You will need to use restorecon to apply the labels.
=================================================================================================
finally work:
[root@ECserver log]# ls -aZ mailstats.db
-rw-r--r--. root root unconfined_u:object_r:snmpd_log_t:s0 mailstats.db
[root@ECserver log]# ls -aZ /usr/local/bin/fetch_mail_statistics.pl
-rwxrwxr-x. otaku119 otaku119 unconfined_u:object_r:bin_t:s0 /usr/local/bin/fetch_mail_statistics.pl
[root@ECserver log]# chcon -R -t snmpd_exec_t /usr/local/bin/fetch_mail_statistics.pl
[root@ECserver log]# ls -aZ /usr/local/bin/fetch_mail_statistics.pl
-rwxrwxr-x. otaku119 otaku119 unconfined_u:object_r:snmpd_exec_t:s0 /usr/local/bin/fetch_mail_statistics.pl
2015/4/20
Monting SQL server 2012 Express in cacti using wmic
建立了cacti ,使用WMIC來監控SQL server 2012 Express狀態
發現一直給我
[wmi/wmic.c:212:main()] ERROR: Retrieve result data.一直尋找,終於在這邊找到一部份原因:
NTSTATUS: NT code 0x80041010 - NT code 0x80041010
https://support.microsoft.com/en-us/kb/820847/en-us
o confirm that this problem is occurring, you can use the WbemTest.exe tool that is provided with Microsoft Windows Server 2003. To use the WbemTest.exe tool, follow these steps:
- Click Start, click Run, type Wbemtest, and then click OK.
- In Windows Management Instrumentation Tester, click Connect.
- In the Namespace box, type root\cimv2, and the click Connect.
- Click Enum Classes.
- In the Enter superclass name box, type Win32_Perf, click Recursive, and then click OK.
- In Query Results, you will not see results for the counters that are not transferred to WMI.
- Win32_PerfFormattedData_SDSMTPROUTING_SMTPRouting
- Win32_PerfRawData_SDSMTPROUTING_SMTPRouting
歸納如下:
1.我升級到標準版,一樣監控不到,原因是:WMI的emun class名字沒變(意思就是:不要搞升級,重新安裝)
2.真的要監控express版本,WQL:"SELECT * FROM Win32_PerfRawData_MSSQLSQLEXPRESS_MSSQLSQLEXPRESSTransactions",
正式版本的
WQL:"SELECT * FROM Win32_PerfFormattedData_MSSQLSERVER_SQLServerDatabases"
所以:自己努力改CACTI的template吧
2015/4/16
Configuring Windows for Remote Monitoring with WMI
網路上範例很多
節錄其中一個
補充:
如果LINUX上面用wmic要抓資料
還需要將使用者加入到
因為很重要所以要說三次
REMARK:
Remote Desktop Users加入這個群組之後,才能抓到2003的TS 數目
from:
https://support.software.dell.com/zh-cn/foglight-for-virtualization-enterprise-edition/kb/129359
Minimum Requirements for Windows Management Instrumentation
節錄其中一個
補充:
如果LINUX上面用wmic要抓資料
還需要將使用者加入到
Performance Monitor USER
還需要將使用者加入到Performance Monitor USER
還需要將使用者加入到Performance Monitor USER
因為很重要所以要說三次
REMARK:
Remote Desktop Users加入這個群組之後,才能抓到2003的TS 數目
from:
https://support.software.dell.com/zh-cn/foglight-for-virtualization-enterprise-edition/kb/129359
Minimum Requirements for Windows Management Instrumentation
STEPS:
To grant DCOM permissions to a remote user:
1. On the monitored host machine, at the Windows Run prompt, type DCOMCNFG and press Enter.
2. In the Component Services dialog box that opens, navigate to Component Services > Computers > My Computer.
3. Right-click My Computer and click Properties.
4. In the My Computer Properties dialog box, click the COM Security tab.
5. In the Launch and Activation Permissions area, click Edit Limits.
6. In the Launch Permission dialog box, add the user or group name necessary for the remote user.
7. Grant the remote user all the permissions available in the Permissions for Administrators area by enabling all the check boxes in the Allow column.
8. Click OK and close the dialog boxes.
To grant minimum WMI permissions to a remote user:
1. On the monitored host machine, right-click on My Computer, and navigate to Manage > Services and Applications > WMI Control.
2. Right-click WMI Control and click Properties.
3. In the WMI Control Properties dialog box, click the Security tab.
4. Expand the Root node and select CIMV2, then click Security.
5. In the Security for ROOT\CIMV2 dialog box Security list, select the remote user.
6. Enable the following check boxes in the Allow column:
a. Execute Methods
b. Enable Account
c. Remote Enable
d. Read Security
7. Click Apply and then click OK.

To grant DCOM permissions to a remote user:
1. On the monitored host machine, at the Windows Run prompt, type DCOMCNFG and press Enter.
2. In the Component Services dialog box that opens, navigate to Component Services > Computers > My Computer.
3. Right-click My Computer and click Properties.
4. In the My Computer Properties dialog box, click the COM Security tab.
5. In the Launch and Activation Permissions area, click Edit Limits.
6. In the Launch Permission dialog box, add the user or group name necessary for the remote user.
7. Grant the remote user all the permissions available in the Permissions for Administrators area by enabling all the check boxes in the Allow column.
8. Click OK and close the dialog boxes.
To grant minimum WMI permissions to a remote user:
1. On the monitored host machine, right-click on My Computer, and navigate to Manage > Services and Applications > WMI Control.
2. Right-click WMI Control and click Properties.
3. In the WMI Control Properties dialog box, click the Security tab.
4. Expand the Root node and select CIMV2, then click Security.
5. In the Security for ROOT\CIMV2 dialog box Security list, select the remote user.
6. Enable the following check boxes in the Allow column:
a. Execute Methods
b. Enable Account
c. Remote Enable
d. Read Security
7. Click Apply and then click OK.
2015/4/15
2014/3/12
SQL Server內存遭遇操作系統進程壓榨案例
From :http://blog.jobbole.com/62432/
原文出處: Czperfectaction的博客
場景:
最近一台DB服務器偶爾出現CPU報警,我的郵件報警閾(請讀yù)值設置的是15%,開始時沒當回事,以為是有什麼統計類的查詢,後來越來越頻繁。探索:
我決定來查一下,究竟是什麼在作怪,我排查的順序如下:1、首先打開Cacti監控,發現最近CPU均值在某天之後驟然上升,並且可以看到System\Processor Queue Length 和 sqlservr\%ProcessorTime 也在顯著的變化。
2、從最容易入手的低效SQL開始,考慮是不是最近業務做了什麼修改?連接到該SQL實例,打開活動監視器,展開「最近耗費大量資源的查詢」,並 CPU時間倒序,在這裡並未發現有即時的耗費資源的查詢。據個人經驗,這裡的值如果是4位數,分鐘內執行次數3位數,一般的服務器CPU大概就10%以 上,如果cpu時間那裡是5位數,且分鐘內執行次數也很高,幾百次以上,那CPU一般就會不淡定了。圖片僅為演示
3、沒有耗資源的SQL,這是DBA最不願意看到的結果,因為也許,SQL Server受到了來自內部或者外部的壓力,使得自己花費了過多的時間去處理與操作系統的溝通去了。SQL Server常見的非查詢低效類的性能問題,絕大多數都來自於內存或者硬盤,而這兩者有的時候需要同時研究對比基線,才能確定誰是因,誰是果。在這裡,我 們首先查看SQL Server內存使用情況,當打開性能計數器時,我和我的小夥伴們都驚呆了……安裝了64G內存的數據庫,SQL Server的TargetMemory僅有500多兆!這其中StolenPage還佔用了200多兆,數據庫DataPage僅有200多兆的內存可 供使用,Oh,Shit!雖然我很不想用「去哪了」這三個字,但是「我的內存去哪了「?同時我們也注意到PageLifeExpectancy值只有 26(一個內存充足的服務器,這個值至少應該是上W的),而很早之前我們津津樂道的」Cache Hit Ration」卻仍然保持一個比較高的水準98! 這個案例告訴我們,緩存命中率這個性能計數器很多時候說明不了什麼問題。
4、OK,既然這樣,是誰佔用了本該屬於我親愛的SQL Server的內存呢?我們繼續,打開Wiindows任務管理,選定進程選項卡,點擊顯示所有用戶進程,發現svchost.exe佔用了絕大多數的60G內存!
5、那svchost.exe又是個什麼東西呢?我們下面就用到ProcessMonitor這個工具了,打開後自動加載所有Wiindows進程,按內存排序後,鼠標移至svchost.exe進程上,顯示為Remote Registry服務。
6、查到這裡,事情已經有了一定的眉目,這個多半是windows內存洩露Bug,遂google關鍵詞: windows server 2008 r2 remote registry memory leak
找到如下鏈接:http://support.microsoft.com/kb/2699780/en-us
果然:Assume that you query performance counters on a remote computer by using an application on a computer that is running Windows 7 or Windows Server 2008 R2. In this situation, the memory usage of the Remote Registry service on the local computer increases until the available memory is exhausted.
解決方法:
1、重啟服務器,安裝hotfix2、因為重啟服務器會影響到業務,所以我在想重啟RemoteRegistry服務,應該也能暫時解決問題,這個bug應該是在某種固定情景下發生的。
隨後,在合適的時間,我重啟了這個服務,SQL Server的TargetMemory重新恢復到60多G,CPU也正常了,目前為止該問題未再發生。
後續跟進:
DBA的工作,說難也難,說容易也容易,發現問題,解決問題還不夠,我們還要意識到自己的欠缺,在本案例中,我之前並沒有建立起SQL Server內存的監控,所以沒有在第一時間就發現病情的嚴重性,好在該服務器並未承擔重要業務,否則後果不堪設想,說不定早就崩潰過了,後怕之處在於, 如果崩潰了,自然要重啟服務器,到那個時候,我們連第一現場都沒有,當leader問起來,我又該使勁撓頭了。該事件之後,我建立起了SQL Server內存的監控,1天後,我從新的監控數據中,又發現了一台服務器出現相同的問題!我很慶幸,不是慶幸服務器沒宕機,而是慶幸我做對了。
附一張內存監控圖,可以看到服務重啟之後,SQL Server的Total Pages一直在上升,並逐漸穩定,Page life expectancy也在變得越來越大,CPU也能指示病症已消除,我很欣慰。
總結:
服務器在出現性能問題前,大部分是提前有一些徵兆的,尤其是內存洩露,因為內存是一點點被壓榨掉的,最後到達一個極限時,SQL Server就會突然Crash掉,然後只留給你一個dump,微軟就笑了。有經驗的大夫應該從日常的腰酸背痛中看出一些端倪,然後進一步分析,提前預知 重大疾病的發生,這就是DBA的價值。這個案例,告訴我,重視服務器異常的細節變化,才能做到防患於未然。
訂閱:
文章 (Atom)
-
祺有吉祥之意。對商人(也指生意人、做買賣的人等)的祝願一類的意思(但一般不是祝賀)。類似的,還有如「敬頌師祺」等 結尾的敬詞: 1、請安: 用於祖父母及父母:恭叩 金安、敬請福安 肅請 金安。 用於親友長輩:恭請 福綏、敬請 履安敬叩 崇安 只請提安、敬請 頤安、虔清 康安。 用...
-
來源: http://stenwang.blogspot.com/2015/10/agent.html 客戶端威盾agent卸載 問題: 威盾agent客戶端無法連接到服務器時如何卸載 分析: 1、客戶端網卡硬件故障網絡連接網絡 2、客戶端被威盾限制無法安裝可執行程...
-
From: http://lobogaw.pixnet.net/blog/trackback/32dd61d3ef/90548780 在ISO 9000文件中, 一階文件 : 品質手冊 -- QM (Quality Manual), 二階文件 : 品質程序書...
