I’m having trouble getting Elixometer to work with statsd when statsd is running on a server other than localhost.
Everything works fine when running it locally, but when I have the app running on a different machine than statsd, it doesn’t work. My firewall does allow UDP requests from the app server to port 8125 of the statsd server, so I don’t think it’s a networking problem.
I can successfully update statsd from the app server with a bash command. I can even successfully update statsd from the app console on my server using :os.cmd
. It is only when I go through Elixometer/exometer_core/exometer_report_statsd that nothing happens.
Here is the config that works on my local machine:
config :elixometer,
reporter: :exometer_report_statsd,
update_frequency: 5_000,
env: Mix.env,
metric_prefix: "myapp"
config :exometer_core, report: [
reporters: [
exometer_report_statsd: [
host: "localhost",
port: 8125
]
]
]
And here is the config on the app server:
config :elixometer,
reporter: :exometer_report_statsd,
update_frequency: 5000,
env: Mix.env,
metric_prefix: "hydrogen"
config :exometer_core, report: [
reporters: [
exometer_report_statsd: [
host: "10.0.0.6",
port: 8125
]
]
]
I can use the following bash command to update statsd successfully (I run this from the same server as the app):
echo "deploys.test.myservice:1|c" | nc -w 1 -u 10.0.0.6 8125
I know this may not specifically be Elixometer’s fault, but I’m running out of ideas to get this working