Difference between revisions of "V4 to v5 migration guide"
(→Apache plugin: New section.) |
(→HDDTemp plugin: New section.) |
||
Line 58: | Line 58: | ||
Versions [[Version 4.7|4.7]] through [[Version 4.10|4.10]] included backwards compatibility code for configurations without ''Instance'' blocks. This code has been removed in [[version 5.0]]. | Versions [[Version 4.7|4.7]] through [[Version 4.10|4.10]] included backwards compatibility code for configurations without ''Instance'' blocks. This code has been removed in [[version 5.0]]. | ||
+ | |||
+ | === {{Plugin|HDDTemp}} === | ||
+ | |||
+ | The ''TranslateDevicename'' configuration option has been removed. | ||
+ | |||
+ | For backwards compatibility reason, the default behavior was to translate device names such as "/dev/sda" to major and minor device numbers, e.g. "8-0". This translation could be disabled by setting ''TranslateDevicename'' to ''false''. | ||
+ | |||
+ | The new behavior is to ''not'' translate device names, i.e. behave as if the option was set to ''false''. | ||
+ | |||
+ | {| | ||
+ | ! <span style="color: red;">Old</span> | ||
+ | ! <span style="color: green;">New</span> | ||
+ | |- | ||
+ | | | ||
+ | <Plugin "hddtemp"> | ||
+ | … other options … | ||
+ | '''TranslateDevicename false''' | ||
+ | </Plugin> | ||
+ | | | ||
+ | <Plugin "hddtemp"> | ||
+ | … other options … | ||
+ | |||
+ | </Plugin> | ||
+ | |- | ||
+ | | style="vertical-align: top;" | | ||
+ | <Plugin "hddtemp"> | ||
+ | … other options … | ||
+ | '''TranslateDevicename true''' | ||
+ | </Plugin> | ||
+ | | style="vertical-align: top;" | | ||
+ | <Plugin "hddtemp"> | ||
+ | … other options … | ||
+ | |||
+ | </Plugin> | ||
+ | +Rename RRD files! | ||
+ | |} | ||
+ | |||
+ | If you used ''TranslateDevicename true'' or used the default behavior, you need to move the [[RRD]] files or rename the data by other means. If you used the recommended setting ''false'', you only need to remove this line from the config. | ||
=== Todo === | === Todo === | ||
− | |||
− | |||
* {{Plugin|MySQL}} | * {{Plugin|MySQL}} | ||
* {{Plugin|Network}} | * {{Plugin|Network}} |
Revision as of 13:39, 27 September 2010
Since version 5.* is a different major version than version 4.*, some things have been changed in a backwards incompatible manner. This migration guide is here to help you with the transition.
Contents
Upgrade strategy
If you use collectd in a client / server setup, we recommend to upgrade the server instance(s) first. This allows you to use the v5 upgrade target which transforms data sent by v4 clients to the new v5 layout. Once the server is running v5 and the v5 upgrade target you can easily upgrade the clients one by one.
This step-by-step migration suggestion assumes you have one or more dedicated collectd servers writing RRD files. The directive is to upgrade the servers and minimizing the resulting gap in the collected data.
- If you have only one server:
- Set up a second server identical to your production machine. You can use the
Forwarding
option of the Network plugin or a packet filter such as ip_tables to send a copy of the network traffic to your clone.
- Set up a second server identical to your production machine. You can use the
- If you have two or more redundant servers:
- Enter a downtime for one server in the monitoring and remove it from the load balancing if the server is used to create graphs. Let it still receive and handle collectd traffic, though.
- On this separate server:
- Install the v5 daemon.
- Adapt the configuration for plugins collecting data locally. Usually this is fairly easy on central collectd servers.
- Configure the v5 upgrade target. Usually this is as simple as adding the following block to your collectd configuration:
<Chain "PreCache"> Target "v5upgrade" </Chain>
- (Re)start the daemon.
- Look for files that are no longer upgraded and rename them or split them up. Look at #Migrating existing RRD files for details on this. Possibly rsync / scp the RRD files and run the migration script multiple times until you are satisfied with the migrated data.
- On your original server / For each other server:
- Install the v5 daemon.
- Copy the v5 config and adapt hostname / IP-addresses etc.
- Restart the daemon.
- rsync / scp the migrated files to get a clean data set without gaps.
Migrating the configuration
This section details which changes you need to make to the configuration file.
FQDNLookup
The default value for FQDNLookup has been changed. It used to be disabled by default and it's now enabled by default. You can use "FQDNLookup false
" to configure the old default behavior. Enabling this option is recommended though.
Apache plugin
The old configuration was suited for one webserver only. The new configuration (added in version 4.7) puts the same configuration options into <Instance />
blocks.
Old | New |
---|---|
<Plugin "apache"> URL "http://localhost/mod_status?auto" </Plugin> |
<Plugin "apache"> <Instance ""> URL "http://localhost/mod_status?auto" </Instance> </Plugin> |
The string argument of the Instance blocks is used as the plugin instance. The example above used an empty string ("") as the instance name to get the same behavior the previous version (without Instance blocks) used.
Versions 4.7 through 4.10 included backwards compatibility code for configurations without Instance blocks. This code has been removed in version 5.0.
HDDTemp plugin
The TranslateDevicename configuration option has been removed.
For backwards compatibility reason, the default behavior was to translate device names such as "/dev/sda" to major and minor device numbers, e.g. "8-0". This translation could be disabled by setting TranslateDevicename to false.
The new behavior is to not translate device names, i.e. behave as if the option was set to false.
Old | New |
---|---|
<Plugin "hddtemp"> … other options … TranslateDevicename false </Plugin> |
<Plugin "hddtemp"> … other options … </Plugin> |
<Plugin "hddtemp"> … other options … TranslateDevicename true </Plugin> |
<Plugin "hddtemp"> … other options … </Plugin> +Rename RRD files! |
If you used TranslateDevicename true or used the default behavior, you need to move the RRD files or rename the data by other means. If you used the recommended setting false, you only need to remove this line from the config.
Todo
Migrating existing RRD files
Todo:
Other
Todo: