Re: what is right place to load subagent configuration

Андрей Лобов <[email protected]> Tue, 7 May 2024 15:17:52 +0300
Newsgroups gmane.network.net-snmp.user
Message-ID <CALs6EaWWFwh1G+AKx5nQhhGnHAVXwDDz7mbZota_hvkbPu6YRQ@mail.gmail.com>
--===============8208443717211351374==
Content-Type: multipart/alternative; boundary="00000000000072c8b40617dc2d74"

--00000000000072c8b40617dc2d74
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

And another related question - how to hook on agent shutdown in order to
properly release the resources.

Thanks,
Andrey

=D0=BF=D0=BD, 6 =D0=BC=D0=B0=D1=8F 2024=E2=80=AF=D0=B3. =D0=B2 18:03, =D0=
=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9 =D0=9B=D0=BE=D0=B1=D0=BE=D0=B2 <nekulturi=
[email protected]>:

> 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 t=
he
> parameters at the agent startup.
> Is the same Netsnmp_Node_Handler function OK to use or are there any othe=
r
> handlers I could use to hook on agent initialization?
>
> Thank you in advance
>
> Regards,
> Andrey
>

--00000000000072c8b40617dc2d74
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">And another related question - how to hook on agent shutdo=
wn in order to properly release the resources.<div><br></div><div>Thanks,</=
div><div>Andrey</div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" =
class=3D"gmail_attr">=D0=BF=D0=BD, 6 =D0=BC=D0=B0=D1=8F 2024=E2=80=AF=D0=B3=
. =D0=B2 18:03, =D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9 =D0=9B=D0=BE=D0=B1=D0=
=BE=D0=B2 &lt;<a href=3D"mailto:[email protected]">[email protected]=
m</a>&gt;:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0=
px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div =
dir=3D"ltr">He everyone,<div><br></div><div>I write subagent, referring to =
the guide=C2=A0<a href=3D"http://www.net-snmp.org/wiki/index.php/TUT:Writin=
g_a_Subagent" target=3D"_blank">http://www.net-snmp.org/wiki/index.php/TUT:=
Writing_a_Subagent</a>=C2=A0</div><div>So far so good - I&#39;m able to get=
 the simple scalar metric.</div><div>Now I need to use some parameters, whi=
ch should be loaded from configuration files.</div><div>From what I got I n=
eed to use register_config_handler, but what=C2=A0I do not quite get - what=
 should be the right place to call it and when the config file will actuall=
y be read, as I need to make sure somehow I&#39;ve got all the parameters a=
t the agent startup.</div><div>Is the same Netsnmp_Node_Handler function OK=
 to use or are there any other handlers I could use to hook on agent initia=
lization?</div><div><br></div><div>Thank you in advance</div><div><br></div=
><div>Regards,</div><div>Andrey</div></div>
</blockquote></div>

--00000000000072c8b40617dc2d74--


--===============8208443717211351374==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============8208443717211351374==
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

--===============8208443717211351374==--