<!DOCTYPE html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>Dear Jesper,<br></div><div><br></div><div>using rebar3 shell and then tying in the following lines as instructed by the creator of the code, Radoslaw<br></div><div>aperri@debian:~/try$ rebar3 shell<br></div><div>===> Verifying dependencies...<br></div><div>Erlang/OTP 24 [erts-12.0.3] [source] [64-bit] [smp:1:1] [ds:1:1:10] [async-threads:1] [jit]<br></div><div><br></div><div>Eshell V12.0.3 (abort with ^G)<br></div><div>1> application:load(erflux),<br></div><div>1> application:set_env(erflux, host, <<"localhost">>),<br></div><div>1> application:set_env(erflux, port, 8086),<br></div><div>1> application:set_env(erflux, username, <<"root">>),<br></div><div>1> application:set_env(erflux, password, <<"root">>),<br></div><div>1> application:set_env(erflux, ssl, false),<br></div><div>1> application:set_env(erflux, timeout, infinity),<br></div><div>1> application:ensure_all_started(erflux),<br></div><div>1> erflux_sup:add_erflux(erflux_http).<br></div><div>{ok,<0.253.0>}<br></div><div><br></div><div>was OK until this line which generates an http error for not being able to find a file.<br></div><div>2> erflux_http:get_databases().<br></div><div>{error,404}<br></div><div>3><br></div><div><br></div><div>in the code there are a series of defines all to do with a database. <br></div><div><br></div><div>-define(DATABASE_NAME, erfluxtest).<br></div><div>-define(DATABASE_ADMIN, testadmin).<br></div><div>-define(DATABASE_USER, testuser).<br></div><div>-define(DATABASE_USER_PASS, testpass).<br></div><div>-define(SERIES_NAME, testseries).<br></div><div><br></div><div>-define(DATABASE_NAME_ATOM, <<"erfluxtest">>).<br></div><div>-define(DATABASE_ADMIN_ATOM, <<"testadmin">>).<br></div><div>-define(DATABASE_USER_ATOM, <<"testuser">>).<br></div><div><br></div><div><br></div><div>I have inFlux DB installed in Debian buster running locally. Would I have to create the database name, user and password, in InFlux DB that corresponds to the above defines before running the code? <br></div><div><br></div><div>I really trying to get oriented on how to use Radoslaw application, Would you know what to do to help me out with this.<br></div><div><br></div><div>Thanks,<br></div><div>Alberto<br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div id="sig6827885"><div class="signature">-- <br></div><div class="signature"> Alberto Perri<br></div><div class="signature"> <a href="mailto:aperri@operamail.com">aperri@operamail.com</a><br></div><div class="signature"><br></div></div><div><br></div><div><br></div><div>On Mon, Aug 16, 2021, at 1:40 PM, Jesper Louis Andersen wrote:<br></div><blockquote type="cite" id="qt" style=""><div dir="ltr"><div class="qt-gmail_default" style="font-family:arial, helvetica, sans-serif;">The function is available in the module, so I'm inclined to think it's something with the load path. Try loading the module from the shell and check that it is present (commands l/1 and m/1, but they only work from the shell).<br></div></div><div><br></div><div class="qt-gmail_quote"><div dir="ltr" class="qt-gmail_attr">On Mon, Aug 16, 2021 at 12:40 PM Alberto Perri <<a href="mailto:aperri@operamail.com">aperri@operamail.com</a>> wrote:<br></div><blockquote class="qt-gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-color:rgb(204, 204, 204);border-left-style:solid;border-left-width:1px;padding-left:1ex;"><div>Hello Erlang friends,<br></div><div> <br></div><div> i have been trying to run InfluxDB client for Erlang. You will find it at <a href="https://github.com/gossiperl/erflux" rel="noreferrer" target="_blank">https://github.com/gossiperl/erflux</a>. Could any of you explain to me how to run it. <br></div><div> <br></div><div> In the erflux_sup.erl file there is this line of code which states which module to pass to add_erflux/1 function<br></div><div> -spec add_erflux( Name :: atom() ) -> statup_result().<br></div><div> %% @doc Starts instance of erflux with a given name. If name other than erflux_http, pid() versions of erflux_http functions have to be used.<br></div><div> add_erflux(Name) -><br></div><div> add_erflux_internal( Name, #erflux_config{} ).a<br></div><div> <br></div><div> Alternatively the Read<br></div><div> <br></div><div> <br></div><div> <br></div><div> -- <br></div><div> Alberto Perri<br></div><div> <a href="mailto:aperri@operamail.com" target="_blank">aperri@operamail.com</a><br></div></blockquote></div><div><br></div><div><br></div><div>-- <br></div><div dir="ltr" class="qt-gmail_signature">J.<br></div></blockquote><div><br></div></body></html>