what is right place to load subagent configuration
Андрей Лобов <[email protected]> Mon, 6 May 2024 18:03:24 +0300
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <CALs6EaWnuX7CprmPBChyZbPW+=yy4UQJFfyD9j5jAAd-UaviZA@mail.gmail.com> |
--===============4316680593906585545== Content-Type: multipart/alternative; boundary="000000000000b51c2a0617ca5f09" --000000000000b51c2a0617ca5f09 Content-Type: text/plain; charset="UTF-8" He everyone, I write subagent, referring to the guide http://www.net-snmp.org/wiki/index.php/TUT:Writing_a_Subagent So far so good - I'm able to get the simple scalar metric. Now I need to use some parameters, which should be loaded from configuration files. From what I got I need to use register_config_handler, but what I do not quite get - what should be the right place to call it and when the config file will actually be read, as I need to make sure somehow I've got all the parameters at the agent startup. Is the same Netsnmp_Node_Handler function OK to use or are there any other handlers I could use to hook on agent initialization? Thank you in advance Regards, Andrey --000000000000b51c2a0617ca5f09 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">He everyone,<div><br></div><div>I write subagent, referrin= g to the guide=C2=A0<a href=3D"http://www.net-snmp.org/wiki/index.php/TUT:W= riting_a_Subagent">http://www.net-snmp.org/wiki/index.php/TUT:Writing_a_Sub= agent</a>=C2=A0</div><div>So far so good - I'm able to get the simple s= calar metric.</div><div>Now I need to use some parameters, which should be = loaded from configuration files.</div><div>From what I got I need to use re= gister_config_handler, but what=C2=A0I do not quite get - what should be th= e right place to call it and when the config file will actually be read, as= I need to make sure somehow I've got all the parameters at the agent s= tartup.</div><div>Is the same Netsnmp_Node_Handler function OK to use or ar= e there any other handlers I could use to hook on agent initialization?</di= v><div><br></div><div>Thank you in advance</div><div><br></div><div>Regards= ,</div><div>Andrey</div></div> --000000000000b51c2a0617ca5f09-- --===============4316680593906585545== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============4316680593906585545== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users --===============4316680593906585545==--