I am sponsoring this case for Amit Gupta. It introduces collectd into OpenSolaris. Timeout set to Nov.13.
Template Version: @(#)sac_nextcase 1.68 02/23/09 SMI This information is Copyright 2009 Sun Microsystems 1. Introduction 1.1. Project/Component Working Name: Deliver collectd 4.8.x into OpenSolaris 1.2. Name of Document Author/Supplier: Author: Amit Gupta 1.3 Date of This Document: 06 November, 2009 4. Technical Description Deliver collectd 4.8.x into OpenSolaris 6 November 2009 1. Summary and motivation 1.1. Introduction This project delivers collectd 4.8.x into OpenSolaris collectd is a daemon which collects system performance statistics periodically and provides mechanisms to store the values in a variety of ways, for example in RRD files. For more information about collectd see: http://collectd.org 2. Technical issues 2.1. Key objects /usr/collectd4/lib/collectd From collectd's man page: collectd is a daemon that receives system statistics and makes them available in a number of ways. The main daemon itself doesn't have any real functionality apart from loading, querying and submitting to plugins. /etc/collectd4/collectd.conf The default collectd configuration file. Do note that this project won't deliver collectdmon. This wrapper will not be required since SMF will take care of starting and monitoring the collectd daemon. 2.2. Versioning From collectd's FAQ: The version numbers in collectd consist of three numbers: The major- and minor-number and the patchlevel. * Versions with different major-numbers are basically not compatible. This means that the definitions of RRD-files or config-options have been changed or, in general, that the user has to do something in addition to install the new version. This is not nice and avoided when possible, but sometimes necessary to prevent old mistakes to become ancient mistakes. * Versions with differing minor-numbers are backwards compatible, i. e. you can replace the lower version with the higher one and everything should still work. This means that features are added, but not removed or changed and that the default behavior does not change. * Versions with different patchlevels are both, forward- and backwards-compatible, because no new features have been introduced. The only difference between the two versions is one or more bug fixes, so you should generally install the higher version of the two. 2.3 Loadable Plugins collectd ships with a number of loadable plugins which are enabled through directives in the config file. Some of these plugins have library dependencies that must be satisfied through build time package options (supplied to the configure script). An example is mysql.so which has a dependency on the mysql client libraries. Support for loadable plugins and other features is enabled at build time through flags to the configure script. All the plugins that are delivered have sample configuration directives in collectd.conf. Note that in many cases, these are just sample directives and will need to be modified based on site specific configuration. Detailed documentation about specific plugin configuration can be found in the collectd website. Not all the plugins are enabled by default in collectd.conf. The configuration directives for plugins which are not enabled are commented out in collectd.conf. The plugins which are enabled by default are: syslog, cpu, interface, load, memory and rrdtool Other plugins can be enabled in one of the following two ways: * By adding/uncommenting the plugin configuration directives in collectd.conf * By dropping a .conf file having the necessary plugin configuration directives into the /etc/collectd4/conf.d Similarly, plugins can be disabled as needed in the following two ways: * By removing/commenting out the plugin configuration directives from collectd.conf * By deleting the plugin specific .conf file from the /etc/collectd4/conf.d directory Do note that collectd.conf is read and processed in order, i. e. from top to bottom. So the plugins are loaded in the order listed in collectd.conf. This project will deliver the following plugins: * Apache * CPU * CSV * cURL * DF * Disk * Exec * FileCount * GenericJMX * Interface * Java * Load * LogFile * memcachec * memcached * Memory * MySQL * Network * Notify Desktop * NTPd * PostgreSQL * RRDtool * SNMP * Swap * SysLog * Table * Tail * Tape * UnixSock * Uptime * Users * UUID * Write HTTP * ZFS ARC 2.4 Directory Naming and Structure The proposed directory layout for collectd is: /usr/collectd4 /lib /man /share /etc/collectd4 /conf.d /var/collectd4 /rrd /logs /run The detailed directory and file layout for collectd is provided in Appendix 1. Multiple versions can coexist, and are distinguished by the naming scheme (collectd4 for version 4.*.*, collectd5 for version 5.*.*). 2.5 Configuration File This project will use the standard convention and deliver configuration files under /etc/collectd4 The default configuration file provided with this integration will work out of the box. In addition, a directory conf.d will be created in /etc/collectd4/ The default configuration loads any file with a .conf extension that is placed in this directory. Hence, plugins can optionally be configured by simply dropping a <plugin>.conf file into this directory without modifying the main configuration file. By default, conf.d will not contain any plugin configuration files. 2.6 Log File The log File will be located in /var/collectd4/logs and will be named collectd.log. The default log level is info and can be changed by modifying the main configuration file. 2.7 Build features Build time package selection determines which collectd loadable plugins are available to the user at runtime. A complete list of collectd modules is available on the http://collectd.org. However, not all plugins can be built on OpenSolaris because of dependencies on external libraries and hence, only a subset of the plugins will be delivered. 3. collectd documentation collectd 4.* provides a full and complete documentation set, in UNIX manual format. This project will deliver the complete documentation set. 4. Packaging and Delivery We propose to package collectd under the following packages: SUNWcollectd4u - [usr] Server package (including collectd daemon, loadable plugins, man pages) SUNWcollectd4r - [root] (config files, smf files) 5. collectd Interfaces 5.1. Interface Stability collectd has no obvious history of any interface instability and the expectation is that dot releases of collectd will be compatible. This is not completely guaranteed by the community and it is possible that interfaces may change due to the fixing of bugs. 5.2. Imported Interfaces libcurl Volatile PSARC/2007/165 Output format of Apache's mod_status N/A PSARC/2007/586 Output format of Lighhtpd's mod_status N/A LSARC/2008/191 libmysqlclient Committed LSARC 2009/062 libnetsnmp Uncommitted LSARC/2008/355 librrd Uncommitted LSARC/2008/129 libpq Uncommitted LSARC/2009/349 Java SE 6 Committed PSARC/2006/430 libkstat Uncommitted PSARC/1992/085 kstat_read Stable PSARC/1992/085 getmntent Evolving PSARC/1999/131 getloadavg Standard PSARC/1996/196 libmemcached Uncommitted LSARC/2008/126 libgcrypt Volatile LSARC/2008/354 libnotify Volatile LSARC/2007/137 swapctl Stable PSARC/1997/099 libhal Volatile PSARC/2005/399 getutxent N/A N/A syslog Standard N/A statvfs Stable N/A 5.3. Exported Interfaces NAME STABILITY NOTES ----------------------------------------------------------------------- SUNWcollectd4r Committed package SUNWcollectd4u Committed package collectd config file Uncommitted config file syntax collectd log file Not An Interface log file syntax collectd pid file Project Private daemon pid file /var/collectd4/logs Uncommitted log file dir /etc/collectd4/collectd.conf Uncommitted default conf file /usr/collectd4/lib/*.so Project Private plugins /lib/svc/method/collectd4-svc Project Private SMF svc method svc:/application/monitoring/collectd4:default Committed FMRI /var/svc/manifest/application/monitoring/collectd4.xml Project Private SMF Manifest 6. References [1] http://collectd.org ================================================================ Appendix 1: collectd Integration Directory and File Structure. 1. The following files are included in the collectd integration: /usr/collectd4 /share /man /man1 /collectd.1 /man5 /collectd.conf.5 /collectd-exec.conf /collectd-unixsock.5 /collectd-java.5 /collectd-snmp.5 /types.db.5 /collectd /types.db /postgresql_default.conf /java /java-plugin.jar /jmx.jar /var/collectd4 /logs /collectd.log /rrd /etc/collectd4 /conf.d /collectd.conf /usr/collectd4 /lib /collectd /apache.so /bind.so /cpu.so /csv.so /curl.so /df.so /disk.so /exec.so /filecount.so /interface.so /java.so /load.so /logfile.so /match_regex.so /match_timediff.so /match_value.so /memcached.so /memory.so /mysql.so /network.so /ntpd.so /postgresql.so /rrdtool.so /snmp.so /syslog.so /swap.so /table.so /tail.so /tape.so /target_notification.so /target_replace.so /target_set.so /ted.so /types.db /unixsock.so /uptime.so /users.so /uuid.so /libcollectdclient.so.0.0.0 /libcollectdclient.so.0 -> libcollectdclient.so.0.0.0 /libcollectdclient.so -> libcollectdclient.so.0.0.0 /lib/svc/method/collectd4-svc /var/svc/manifest/application/monitoring/collectd4.xml 6. Resources and Schedule 6.4. Steering Committee requested information 6.4.1. Consolidation C-team Name: sfw 6.5. ARC review type: FastTrack 6.6. ARC Exposure: open