diff --git a/src/zabbix_sender.erl b/src/zabbix_sender.erl index 178bada..945ad3d 100644 --- a/src/zabbix_sender.erl +++ b/src/zabbix_sender.erl @@ -202,10 +202,12 @@ send(Key, Value) -> %% @doc Send Key-Value-pair via server identified by Ref -spec send(server_ref(), key(), value()) -> ok. %% ==================================================================== +send(Ref, {Name, Key}, Value) -> + set_local_name(Ref, Name), + gen_server:cast(Ref, {send, Name, Key, Value}); send(Ref, Key, Value) -> gen_server:cast(Ref, {send, Key, Value}). - %% info/0 %% ==================================================================== %% @doc Return info about singleton server