poxet / Influx-Capacitor

Influx-capacitor collects metrics from windows machines using Performance Counters. Data is sent to influxDB to be viewable by grafana.
http://influx-capacitor.com
MIT License
44 stars 13 forks source link

config show - Unable to connect to database #61

Open 123BLiN opened 8 years ago

123BLiN commented 8 years ago

Hello,

I'm very sorry to disturb, it should be something very simple, but I spent an hour with no success. My config:

<?xml version="1.0" encoding="utf-8"?>
<Influx-Capacitor>
  <Database Type="InfluxDB" Enabled="true">
    <Url>http://influxdb_domain_name:8086</Url>
    <Username>capacitor</Username>
    <Password>capacitor</Password>
    <Name>my_db</Name>
    <RequestTimeoutMs>15000</RequestTimeoutMs>
  </Database>
</Influx-Capacitor>

when I try to test it in console with config show I always get: Unable to connect to database however I'm able to query influxdb with curl:

>Invoke-WebRequest http://influxdb_domain_name:8086/query?q='SHOW DATABASES'
StatusCode        : 200
StatusDescription : OK
Content           : {"results":[{"series":[{"name":"databases","columns":["name"],"values":[["general"],["my_db"]]}]}]}
RawContent        : HTTP/1.1 200 OK

I have: Influx-capacitor 1.0.17, influxdb 0.9.6.1, windows 2012R2

Any advice would be greatly appreciated.

poxet commented 8 years ago

It all looks right to me. I cannot see any issue. And there should be support for version 0.9.6 too. Not sure what to do about this. :/

skonet commented 8 years ago

Hello, I had the same problem, and was able to run from console "config server". This command created the right entry in database.xml, which looks like this:

<?xml version="1.0" encoding="utf-16"?>

http://localhost:8086 dbadmin EAAAAMRCMidx19g0BiQJTlHQyjsmXvN1SqW25kzNMtoTNAPm perfmon

This works, but - despite the documentation - password is somewhat encoded (encrypted?) !? Hope this helps! Stéphane.

skonet commented 8 years ago

Sorry for the copy-paste-code mistake, the database.xml looks like: `<?xml version="1.0" encoding="utf-16"?>

http://localhost:8086 dbadmin EAAAAMRCMidx19g0BiQJTlHQyjsmXvN1SqW25kzNMtoTNAPm perfmon `