chrsblck / redisbeat

Redisbeat - elastic beat for Redis monitoring
Apache License 2.0
25 stars 8 forks source link

Non default Redis port not working? #9

Closed Reonekot closed 7 years ago

Reonekot commented 7 years ago

I can't get redisbeat to connect to my instance of Redis on the same server. My Redis instance is at a non default port and in redisbeat.yml I have: input: port: 6600

But when starting I just get an error with: 2017-03-20T15:46:54+01:00 ERR Error reading server stats: dial tcp [::1]:6379: connectex: No connection could be made because the target machine actively refused it.

I just start redisbeat.exe (Windows) without command options. It does read the other options correctly set in redisbeat.yml (like ES host). Executable is compiled on Windows yesterday from master.

Any ideas on how to get it to connect to the correct Redis port?

chrsblck commented 7 years ago

@Reonekot Should be fixed now. Let me know if you have issues with this still.

Thanks for raising the issue.

Reonekot commented 7 years ago

Thanks a lot for looking into it!

I still can't get it to work though - unfortunately I don't really know Go that much or how the configs are read for the beats, but this is what my start of the config looks like atm:

redisbeat:
   # In seconds, defines how often to read server statistics
   #period: 10

   # Host of redis server, default is localhost
   host: "192.168.72.14"

   # Port the redis server is listening on, default is 6379
   port: 6600

Neither the host or port seems to "stick", and I just get an error from the program: "Exiting: dial tcp [::1]:6379: connectex: No connection could be made because the target machine actively refused it."

I have tried changing "redisbeat" to "config", "input" etc., but that doesn't make a difference it seems. As I wrote earlier, the output.elasticsearch section is read correctly, so the file is per see read correctly by the parser it seems.

chrsblck commented 7 years ago

@Reonekot A few questions:

Reonekot commented 7 years ago

I did a download of the source as zip from Github - as far as I can tell it looks to be the correct version. (With config.go moved to /config etc.) Then I did a rebuild from cmd with: go get go build

Maybe I'm missing something for building it correctly? Unfortunately I'm mostly used to Visual Studio, so not sure how the go build system really works.

chrsblck commented 7 years ago

@Reonekot I'll have a look again this week.

chrsblck commented 7 years ago

@Reonekot It's working for me.

Can you add debug to your config file you're running with.

I'm using the yaml in the same directory as the binary:

$ grep -n " level:" redisbeat.yml
291:  level: debug

Then run redisbeat and look for the config options:

 $ ./redisbeat -e
...
2017/04/04 17:57:55.142956 output.go:251: INFO Loading template enabled. Reading template file: /Users/chrisblack/Go/src/github.com/chrsblck/redisbeat/redisbeat.template.json
...
2017/04/04 17:57:55.143785 redisbeat.go:41: DBG  Redisbeat configuration:
2017/04/04 17:57:55.143799 redisbeat.go:42: DBG  Period 10s
2017/04/04 17:57:55.143805 redisbeat.go:43: DBG  Host localhost
2017/04/04 17:57:55.143810 redisbeat.go:44: DBG  Port 6378
...

Can you give this a try as well?