Reply To: Mongoosim monitoring

Home Forums MongooseIM Mongoosim monitoring Reply To: Mongoosim monitoring

#54547

dodul
Member

I defined mongoose_api_metrics like this:


 { 5280, ejabberd_cowboy, [
      {num_acceptors, 10},
      {max_connections, 1024},
      %%{cert, "priv/server.crt"}, {key, "priv/server.key"}, {key_pass, ""},
      {modules, [
          %% Modules used here should also be listed in the MODULES section.
          {"localhost", "/api", mongoose_api, [{handlers, [mongoose_api_metrics,
                                                           mongoose_api_users]}]},
          {"_", "/http-bind", mod_bosh},
          {"_", "/ws-xmpp", mod_websockets}
          %% Uncomment to serve static files
          %{"_", "/static/[...]", cowboy_static,
          %  {dir, "/var/www", [{mimetypes, cow_mimetypes, all}]}
          %},
      ]}
  ]},

Then in the modules section :

{mongoose_api_metrics, []},

when I start it I get the following error:


2015-03-23 09:54:28.336 [critical] <0.12305.0>@gen_mod:start_module:94 Problem starting the module mongoose_api_metrics for host <<"devel.dingaling.ca">>
 options: []
 error: undef
[{mongoose_api_metrics,start,[<<"devel.dingaling.ca">>,[]],[]},
 {gen_mod,start_module,3,[{file,"src/gen_mod.erl"},{line,83}]},
 {lists,foreach,2,[{file,"lists.erl"},{line,1336}]},
 {ejabberd_app,start,2,[{file,"src/ejabberd_app.erl"},{line,69}]},
 {application_master,start_it_old,4,
                     [{file,"application_master.erl"},{line,272}]}]
2015-03-23 09:54:28.337 [critical] <0.12305.0>@gen_mod:start_module:99 ejabberd initialization was aborted because a module start failed.
The trace is [{mongoose_api_metrics,start,[<<"devel.dingaling.ca">>,[]],[]},{gen_mod,start_module,3,[{file,"src/gen_mod.erl"},{line,83}]},{lists,foreach,2,[{file,"lists.erl"},{line,1336}]},{ejabberd_app,start,2,[{file,"src/ejabberd_app.erl"},{line,69}]},{application_master,start_it_old,4,[{file,"application_master.erl"},{line,272}]}].

How to fix this?

  • This reply was modified 6 days, 5 hours ago by  dodul.