erflux on git hub

Alberto Perri aperri@REDACTED
Mon Aug 16 18:37:21 CEST 2021

Dear Jesper,

using rebar3 shell and then tying in the following lines as instructed by the creator of the code, Radoslaw
aperri@REDACTED:~/try$ rebar3 shell
===> Verifying dependencies...
Erlang/OTP 24 [erts-12.0.3] [source] [64-bit] [smp:1:1] [ds:1:1:10] [async-threads:1] [jit]

Eshell V12.0.3  (abort with ^G)
1> application:load(erflux),
1> application:set_env(erflux, host, <<"localhost">>),
1> application:set_env(erflux, port, 8086),
1> application:set_env(erflux, username, <<"root">>),
1> application:set_env(erflux, password, <<"root">>),
1> application:set_env(erflux, ssl, false),
1> application:set_env(erflux, timeout, infinity),
1> application:ensure_all_started(erflux),
1> erflux_sup:add_erflux(erflux_http).

was OK until this line which generates an http error for not being able to find a file.
2> erflux_http:get_databases().

in the code there are a series of defines all to do with a database. 

-define(DATABASE_NAME, erfluxtest).
-define(DATABASE_ADMIN, testadmin).
-define(DATABASE_USER, testuser).
-define(DATABASE_USER_PASS, testpass).
-define(SERIES_NAME, testseries).

-define(DATABASE_NAME_ATOM, <<"erfluxtest">>).
-define(DATABASE_ADMIN_ATOM, <<"testadmin">>).
-define(DATABASE_USER_ATOM, <<"testuser">>).

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? 

I really trying to get oriented on how to use Radoslaw application, Would you know what to do to help me out with this.


  Alberto Perri

On Mon, Aug 16, 2021, at 1:40 PM, Jesper Louis Andersen wrote:
> 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).
> On Mon, Aug 16, 2021 at 12:40 PM Alberto Perri <aperri@REDACTED> wrote:
>> Hello Erlang friends,
>> i have been trying to run InfluxDB client for Erlang. You will find it at Could any of you explain to me how to run it. 
>> In the erflux_sup.erl file there is this line of code which states which module to pass to add_erflux/1 function
>> -spec add_erflux( Name :: atom() ) -> statup_result().
>> %% @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.
>> add_erflux(Name) ->
>>   add_erflux_internal( Name, #erflux_config{} ).a
>> Alternatively the Read
>> -- 
>>   Alberto Perri
>>   aperri@REDACTED
> -- 
> J.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the erlang-questions mailing list