-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Plugin cURL
Florian Forster edited this page Nov 21, 2023
·
1 revision
Name: | cURL plugin |
---|---|
Type: | read |
Callbacks: | config, init, read, shutdown |
Status: | supported |
FirstVersion: | 4.6 |
Copyright: | 2006–2009 Florian octo Forster, 2009 Aman Gupta |
License: | GPLv2 |
Manpage: | collectd.conf(5) |
See also: | List of Plugins |
The cURL plugin uses libcurl to read files and then parses them according to the configuration. The cURL library is best known to read web pages via HTTP, but a lot more protocol handlers are available, so reading via SSH or from FTP is available as well as local access via file://.
This plugin is a generic plugin, i.e. it cannot work without configuration, because there is no reasonable default behavior. Please read the Plugin curl section of the collectd.conf(5) manual page for an in-depth description of the plugin's configuration.
- → See: Example configurations
<Plugin curl>
<Page "stock_quotes">
<nowiki>URL "http://finance.google.com/finance?q=NYSE%3AAMD"</nowiki>
User "foo"
Password "bar"
<Match>
Regex "<span +class=\"pr\"[^>]*> *([0-9]*\\.[0-9]+) *</span>"
DSType "GaugeAverage"
# Note: "stock_value" is not a standard type.
# Read [http://collectd.org/documentation/manpages/types.db.5.shtml types.db(5)] for details on "types".
Type "stock_value"
Instance "AMD"
</Match>
</Page>
</Plugin>
- Example above from Scott M. Likens <scottatlikens.us>; from usage at Tatto Media.