[collectd] Problem with use of curl_json plugin

sunil kumar N sunil at semiconsoul.com
Fri Aug 1 09:04:36 CEST 2014


Hi, 

I am trying to use curl_json to get stats from http://localhost:5984  /_stats, and got an issue.

And the plugin is configured as described on https://collectd.org/wiki/index.php/Plugin:cURL-JSON. 

But I have got nothing at least no rrd file is created any where under collectd tree. 

The Json string is :

 root at web:/etc/collectd# GET http://localhost:5984/_stats

{"couchdb":{"auth_cache_misses":{"description":"number of authentication cache
 misses","current":null,"sum":null,"mean":null,"stddev":null,"min":null,"max":null},"database_writes":{"description":"number of times a database was changed","current":null,"sum":null,"mean":null,"stddev":null,"min":null,"max":null},"open_databases":{"description":"number of open databases","current":null,"sum":null,"mean":null,"stddev":null,"min":null,"max":null},"auth_cache_hits":{"description":"number of authentication cache hits","current":null,"sum":null,"mean":null,"stddev":null,"min":null,"max":null},"request_time":{"description":"length of a request inside CouchDB without MochiWeb","current":null,"sum":null,"mean":null,"stddev":null,"min":null,"max":null},"database_reads":{"description":"number of times a document was read from a database","current":null,"sum":null,"mean":null,"stddev":null,"min":null,"max":null},"open_os_files":{"description":"number of file descriptors CouchDB has
 open","current":null,"sum":null,"mean":null,"stddev":null,"min":null,"max":null}},"httpd_request_methods":{"PUT":{"description":"number of HTTP PUT requests","current":null,"sum":null,"mean":null,"stddev":null,"min":null,"max":null},"GET":{"description":"number of HTTP GET requests","current":null,"sum":null,"mean":null,"stddev":null,"min":null,"max":null},"COPY":{"description":"number of HTTP COPY requests","current":null,"sum":null,"mean":null,"stddev":null,"min":null,"max":null},"DELETE":{"description":"number of HTTP DELETE requests","current":null,"sum":null,"mean":null,"stddev":null,"min":null,"max":null},"POST":{"description":"number of HTTP POST requests","current":null,"sum":null,"mean":null,"stddev":null,"min":null,"max":null},"HEAD":{"description":"number of HTTP HEAD requests","current":null,"sum":null,"mean":null,"stddev":null,"min":null,"max":null}},"httpd_status_codes":{"403":{"description":"number of HTTP 403 Forbidden
 responses","current":null,"sum":null,"mean":null,"stddev":null,"min":null,"max":null},"202":{"description":"number of HTTP 202 Accepted responses","current":null,"sum":null,"mean":null,"stddev":null,"min":null,"max":null},"401":{"description":"number of HTTP 401 Unauthorized responses","current":null,"sum":null,"mean":null,"stddev":null,"min":null,"max":null},"409":{"description":"number of HTTP 409 Conflict responses","current":null,"sum":null,"mean":null,"stddev":null,"min":null,"max":null},"200":{"description":"number of HTTP 200 OK responses","current":null,"sum":null,"mean":null,"stddev":null,"min":null,"max":null},"405":{"description":"number of HTTP 405 Method Not Allowed responses","current":null,"sum":null,"mean":null,"stddev":null,"min":null,"max":null},"400":{"description":"number of HTTP 400 Bad Request responses","current":null,"sum":null,"mean":null,"stddev":null,"min":null,"max":null},"201":{"description":"number of HTTP 201 Created
 responses","current":null,"sum":null,"mean":null,"stddev":null,"min":null,"max":null},"404":{"description":"number of HTTP 404 Not Found responses","current":null,"sum":null,"mean":null,"stddev":null,"min":null,"max":null},"500":{"description":"number of HTTP 500 Internal Server Error responses","current":null,"sum":null,"mean":null,"stddev":null,"min":null,"max":null},"412":{"description":"number of HTTP 412 Precondition Failed responses","current":null,"sum":null,"mean":null,"stddev":null,"min":null,"max":null},"301":{"description":"number of HTTP 301 Moved Permanently responses","current":null,"sum":null,"mean":null,"stddev":null,"min":null,"max":null},"304":{"description":"number of HTTP 304 Not Modified responses","current":null,"sum":null,"mean":null,"stddev":null,"min":null,"max":null}},"httpd":{"clients_requesting_changes":{"description":"number of clients for continuous
 _changes","current":null,"sum":null,"mean":null,"stddev":null,"min":null,"max":null},"temporary_view_reads":{"description":"number of temporary view reads","current":null,"sum":null,"mean":null,"stddev":null,"min":null,"max":null},"requests":{"description":"number of HTTP requests","current":null,"sum":null,"mean":null,"stddev":null,"min":null,"max":null},"bulk_requests":{"description":"number of bulk requests","current":null,"sum":null,"mean":null,"stddev":null,"min":null,"max":null},"view_reads":{"description":"number of view reads","current":null,"sum":null,"mean":null,"stddev":null,"min":null,"max":null}}}

And for this I did not get any graph/rrd file.

Please help me, Thank you. 

Plug-in configuration is:

<URL "http://localhost:5984/_stats">
    Instance "httpd"
    <Key "httpd/requests/count">
      Type "http_requests"
    </Key>

    <Key "httpd_request_methods/*/count">
      Type "http_request_methods"
    </Key>

    <Key "httpd_status_codes/*/count">
      Type "http_response_codes"
    </Key>
  </URL>
# Database status metrics:
  <URL
 "http://localhost:5984/_all_dbs">
    Instance "dbs"
    <Key "*/doc_count">
      Type "gauge"
    </Key>
    <Key "*/doc_del_count">
      Type "counter"
    </Key>
    <Key "*/disk_size">
      Type "bytes"
    </Key>
  </URL>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20140801/befbec71/attachment.html>


More information about the collectd mailing list