monicazhang 发表于 2015-10-30 14:20:51

Nagios plug-in development guidelines(1)

本帖最后由 monicazhang 于 2015-10-30 21:25 编辑


20151030   淡然

Table of ContentsPreface1. Development platform requirements 开发平台要求
2. Plugin Output for Nagios Nagios插件输出2.1. Print only one line of text 只输出一行文本2.2. Verbose output 详细输出2.3. Screen Output 屏幕输出2.4. Plugin Return Codes plugin返回代码2.5. Threshold and ranges 阀值和区间2.6. Performance data 性能数据2.7. Translations 翻译
3. System Commands and Auxiliary Files 系统命令和附录文件3.1. Don't execute system commands without specifying their full path 不指定完整路径的情况下请不要执行系统命令3.2. Use spopen() if external commands must be executed 使用spopen()执行外部命令3.3. Don't make temp files unless absolutely required 如果不是绝对需要不要创建临时文件3.4. Don't be tricked into following symlinks 不要被下面的符号连接欺骗3.5. Validate all input 验证所有输入
4. Perl Plugins Perl插件
5. Runtime Timeouts 运行时超时5.1. Use DEFAULT_SOCKET_TIMEOUT 使用DEFAULT_SOCKET_TIMEOUT5.2. Add alarms to network plugins 添加报警到网络插件
6. Plugin Options 插件选项6.1. Option Processing 选项处理6.2. Plugins with more than one type of threshold, or with threshold ranges 有多个临界值或有临界值序列的插件
7. Test cases 测试用例7.1. Test cases for plugins 插件测试用例7.2. Testing the C library functions 测试C库函数
8. Coding guidelines 编码向导8.1. C coding C编码8.2. Crediting sources 认证源码8.3. CVS comments CVS提交8.4. Translations for developers 开发者翻译8.5. Translations for translators 翻译人员翻译
9. Submission of new plugins and patches 提交新插件或补丁                                 nagios安装9.1. Patches 补丁9.2. Contributed plugins 分发插件9.3. New plugins 新插件
List of Tables1. Verbose output levels 详细输出级别2. Plugin Return Codes 插件返回代码3. Example ranges 系列实例4. Command line examples 命令行实例
PrefaceThe purpose of this guidelines is to provide a reference for the plug-in developers and encourage the standarization of the different kind of plug-ins: C, shell, perl, python, etc.这个向导的目的是为插件开发者提供一个手册,并为不同类型插件(如:C, shell, perl, python等)提供一个标准。Nagios Plug-in Development Guidelines Copyright (C) 2000-2009 (Nagios Plugins Team)Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.The plugins themselves are copyrighted by their respective authors.插件的版权归开发者个人。                  开源监控软件
Table of Contents1. Development platform requirements2. Plugin Output for Nagios2.1. Print only one line of text2.2. Verbose output2.3. Screen Output2.4. Plugin Return Codes2.5. Threshold and ranges2.6. Performance data2.7. Translations
3. System Commands and Auxiliary Files3.1. Don't execute system commands without specifying their full path                      nagios配置3.2. Use spopen() if external commands must be executed3.3. Don't make temp files unless absolutely required3.4. Don't be tricked into following symlinks3.5. Validate all input
4. Perl Plugins
5. Runtime Timeouts5.1. Use DEFAULT_SOCKET_TIMEOUT5.2. Add alarms to network plugins
6. Plugin Options6.1. Option Processing6.2. Plugins with more than one type of threshold, or with threshold ranges                      监控软件
7. Test cases7.1. Test cases for plugins7.2. Testing the C library functions
8. Coding guidelines8.1. C coding8.2. Crediting sources8.3. CVS comments8.4. Translations for developers8.5. Translations for translators
9. Submission of new plugins and patches9.1. Patches9.2. Contributed plugins9.3. New plugins
1. Development platform requirementsNagios plugins are developed to the GNU standard, so any OS which is supported by GNU should run the plugins. While the requirements for compiling the Nagios plugins release are very basic, developing from the Git repository requires additional software to be installed. These are the minimum levels of software required: 下面是最基本软件环境要求:                               nagios实施GNU make 3.79
GNU automake 1.9.2
GNU autoconf 2.59
GNU m4 1.4.2
GNU libtool 1.5To compile from Git, after you have cloned the repository, run: 从Git编译,从库中复制了代码后,运行以下命令:tools/setup
./configure                                    nagios培训
make
make install
待续: http://www.ITILxf.com/thread-53033-1-1.html
本帖关键字:Nagios
页: [1]
查看完整版本: Nagios plug-in development guidelines(1)