Re: Query keepalived for information such as current priority?
Paul Gildea <[email protected]> Thu, 23 Aug 2018 15:05:08 +0100
| Newsgroups | gmane.linux.keepalived.devel |
|---|---|
| Message-ID | <CAP3D3gcyi_eEodMc298n9k_7J30th1hFmcfGyvYnhcz1AJt5Lw@mail.gmail.com> |
--===============7318050054268942605== Content-Type: multipart/alternative; boundary="00000000000028840105741abf80" --00000000000028840105741abf80 Content-Type: text/plain; charset="UTF-8" Thanks guys! Will look into all this now and revert to you if necessary. -- Paul On 23 August 2018 at 13:22, Damien Clabaut <[email protected]> wrote: > Paul, > > You can dump the state of Keepalived in human-readable format using "kill > -s USR1 $(cat /var/run/keepalived.pid)". > This will create a file in /tmp/keepalived.data > > For stats, you can use signal USR2 instead. It will create a file in > /tmp/keepalived.stats. > > Finally, if you want both in json format, you need to compile Keepalived > with --enable-json (there is a dependency towards libjson-c when compiling), > you can then use signal 36 (kill -s 36) to create the /tmp/keepalived.json > > You can find tools that use these functions here > https://github.com/acassen/keepalived/tree/master/tools/json_tracking > > Regards, > > On Thu, 2018-08-23 at 11:05 +0100, Paul Gildea wrote: > > I am looking for a way to query/poll keepalived for things like > priority, state and so forth. > > Is there a way to do this? I see with SNMP some of the information is > available, but not all of it such as priority. Is there another way to get > > these details without using SNMP? > > > > Regards, > > > > -- > > Paul > > ------------------------------------------------------------ > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Keepalived-devel mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/keepalived-devel > -- > Damien Clabaut > R&D vRouter > OVH > --00000000000028840105741abf80 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Thanks guys! Will look into all this now and revert to you= if necessary.<div><br></div><div>--</div><div>Paul</div></div><div class= =3D"gmail_extra"><br><div class=3D"gmail_quote">On 23 August 2018 at 13:22,= Damien Clabaut <span dir=3D"ltr"><<a href=3D"mailto:damien.clabaut@corp= .ovh.com" target=3D"_blank">[email protected]</a>></span> wrot= e:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-l= eft:1px #ccc solid;padding-left:1ex">Paul,<br> <br> You can dump the state of Keepalived in human-readable format using "k= ill -s USR1 $(cat /var/run/keepalived.pid)".<br> This will create a file in /tmp/keepalived.data<br> <br> For stats, you can use signal USR2 instead. It will create a file in /tmp/k= eepalived.stats.<br> <br> Finally, if you want both in json format, you need to compile Keepalived wi= th --enable-json (there is a dependency towards libjson-c when compiling),<= br> you can then use signal 36 (kill -s 36) to create the /tmp/keepalived.json<= br> <br> You can find tools that use these functions here <a href=3D"https://github.= com/acassen/keepalived/tree/master/tools/json_tracking" rel=3D"noreferrer" = target=3D"_blank">https://github.com/acassen/<wbr>keepalived/tree/master/to= ols/<wbr>json_tracking</a><br> <br> Regards,<br> <span class=3D""><br> On Thu, 2018-08-23 at 11:05 +0100, Paul Gildea wrote:<br> </span><div><div class=3D"h5">> I am looking for a way to query/poll kee= palived for things like priority, state and so forth.<br> > Is there a way to do this? I see with SNMP some of the information is = available, but not all of it such as priority. Is there another way to get<= br> > these details without using SNMP?<br> > <br> > Regards,<br> > <br> > --<br> > Paul<br> </div></div>> ------------------------------<wbr>-----------------------= -------<wbr>------------------<br> > Check out the vibrant tech community on one of the world's most<br= > > engaging tech sites, Slashdot.org! <a href=3D"http://sdm.link/slashdot= " rel=3D"noreferrer" target=3D"_blank">http://sdm.link/slashdot</a><br> > ______________________________<wbr>_________________<br> > Keepalived-devel mailing list<br> > <a href=3D"mailto:[email protected]">Keepalived-d= evel@lists.<wbr>sourceforge.net</a><br> > <a href=3D"https://lists.sourceforge.net/lists/listinfo/keepalived-dev= el" rel=3D"noreferrer" target=3D"_blank">https://lists.sourceforge.net/<wbr= >lists/listinfo/keepalived-<wbr>devel</a><br> <span class=3D"HOEnZb"><font color=3D"#888888">-- <br> Damien Clabaut<br> R&D vRouter<br> OVH<br> </font></span></blockquote></div><br></div> --00000000000028840105741abf80-- --===============7318050054268942605== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot --===============7318050054268942605== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Keepalived-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/keepalived-devel --===============7318050054268942605==--