Difference between revisions of "Plugin:cURL-JSON/Cherokee"

From collectd Wiki
Jump to: navigation, search
m
Line 1: Line 1:
 
{{Example config|cURL-JSON}}
 
{{Example config|cURL-JSON}}
  
== http traffic statistics from Webserver Cherokee ==
+
== Statistics from Webserver Cherokee ==
This chapter will explain how to get information about traffic and connections for the [http://www.cherokee-project.com/ Cherokee] webserver.
+
[http://www.cherokee-project.com/ Cherokee] webserver exposes its statistics as JSON format which make easy to grab the values with collectd using Curl-JSON.<br/>
  
Cherokee webserver exposes its statistics as JSON format which make easy to grab the values with collectd using Curl-JSON.<br/>
+
This chapter will explain how to get information about traffic and connections for the [http://www.cherokee-project.com/ Cherokee] webserver. This is an extract of a small article I wrote on my [http://damnpeople.fr/articles/monitoring_cherokee_with_collectd.html website].
In my case I just monitor a limited set of values (traffic, numbers of connections and I/O cache), but there are a lot of information provided by the handler.
 
  
You'll need first to activate the "server info" handler to a Web directory; as this is beyond the scope of this example I suggest you to have a look to http://www.cherokee-project.com/doc/modules_handlers_server_info.html.
+
In my case I just monitor a limited set of values (traffic, numbers of connections and I/O cache), but there are a lot of information provided by this handler.
 +
 
 +
In Cherokee, you'll need first to activate the "server info" handler to a Web directory; as this is beyond the scope of this example I suggest you to have a look to the [http://www.cherokee-project.com/doc/modules_handlers_server_info.html Documentation]
  
 
* Add the following configuration to collectd.
 
* Add the following configuration to collectd.

Revision as of 14:02, 14 September 2010

This page contains some example configurations for the cURL-JSON plugin. This page is meant as a cookbook, so if you have a configuration for an aspect not handled here or a daemon not present, please feel free to add anything that's useful for you.

Statistics from Webserver Cherokee

Cherokee webserver exposes its statistics as JSON format which make easy to grab the values with collectd using Curl-JSON.

This chapter will explain how to get information about traffic and connections for the Cherokee webserver. This is an extract of a small article I wrote on my website.

In my case I just monitor a limited set of values (traffic, numbers of connections and I/O cache), but there are a lot of information provided by this handler.

In Cherokee, you'll need first to activate the "server info" handler to a Web directory; as this is beyond the scope of this example I suggest you to have a look to the Documentation

  • Add the following configuration to collectd.
LoadPlugin curl_json
…
<Plugin curl_json>
     <URL "http://localhost/about/info/js">
     Instance "cherokee"

       <Key "traffic/tx">
       Type "httpd_bytes"
       </Key>

       <Key "traffic/rx">
         Type "httpd_bytes"
       </Key>

       <Key "connections/number">
           Type "httpd_connections"
       </Key>

       <Key "iocache/hits">
           Type "percent"
       </Key>

</Plugin>

URL defines the URL used to retrieve the JSON file, so it is likely to change for you.

  • You'll need to create a custom types.db and add it these definitions
httpd_bytes             count:COUNTER:0:134217728
httpd_connections       count:GAUGE:0:65535
httpd_requests          count:COUNTER:0:134217728
  • Finally add the new type Db to the configuration (and the standard one also else it won't be loaded)
TypesDB "/usr/share/collectd/types.db" "/etc/collectd/types.db.custom"

References

1. Cheroke Webserver [1]

2. Cherokee Server Info Handler [2]