Re: Query keepalived for information such as current priority?

Quentin Armitage <[email protected]> Thu, 23 Aug 2018 13:17:40 +0100
Newsgroups gmane.linux.keepalived.devel
Organization The Armitage family
Message-ID <[email protected]>
--===============1297008254062371284==
Content-Type: multipart/alternative; boundary="=-7b1FMgoBXNSyDVWzayWo"


--=-7b1FMgoBXNSyDVWzayWo
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit

Paul,
SNMP is probably the way to go. For state, it would be possible to
track that via notify_scripts or notify_fifos, but you can't get
priority that way. There is also the option to parse JSON output, but
that isn't ideal at the moment, and there is also DBus, but I can't
remember what is available via that. Finally it would be possible to
send SIGUSR1 to the parent keepalived process and parse the
/tmp/keepalived.data file, but that really isn't recommended.
You state that "some of the information is not available". Which MIB
are you using? The RFC based VRRP and VRRPv3 MIBs don't provide as much
information as the proprietary KEEPALVIED MIB. If there are specifics
that you need that are missing from SNMP, then they could be added to
the KEEPALIVED MIB. Can you provide a list of the specific information
that you would like to be available.
Regards,Quentin Armitage
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
--=-7b1FMgoBXNSyDVWzayWo
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

<html><head></head><body bgcolor=3D"#ffffff" text=3D"#2e3436" link=3D"#2a76=
c6" vlink=3D"#2e3436"><div>Paul,</div><div><br></div><div>SNMP is probably =
the way to go. For state, it would be possible to track that via notify_scr=
ipts or notify_fifos, but you can't get priority that way. There is also th=
e option to parse JSON output, but that isn't ideal at the moment, and ther=
e is also DBus, but I can't remember what is available via that. Finally it=
 would be possible to send SIGUSR1 to the parent keepalived process and par=
se the /tmp/keepalived.data file, but that really isn't recommended.</div><=
div><br></div><div>You state that "some of the information is not available=
". Which MIB are you using? The RFC based VRRP and VRRPv3 MIBs don't provid=
e as much information as the proprietary KEEPALVIED MIB. If there are speci=
fics that you need that are missing from SNMP, then they could be added to =
the KEEPALIVED MIB. Can you provide a list of the specific information that=
 you would like to be available.</div><div><br></div><div>Regards,</div><di=
v>Quentin Armitage</div><div><br></div><div>On Thu, 2018-08-23 at 11:05 +01=
00, Paul Gildea wrote:</div><blockquote type=3D"cite" style=3D"margin:0 0 0=
 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div dir=3D"ltr">I a=
m looking for a way to query/poll keepalived for things like priority, stat=
e and so forth.<div>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 anot=
her way to get these details without using SNMP?</div><div><br></div><div>R=
egards,</div><div><br></div><div>--</div><div>Paul</div></div></blockquote>=
</body></html>
--=-7b1FMgoBXNSyDVWzayWo--



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

--===============1297008254062371284==--