Re: [Keepalived-devel] Query keepalived for information such as current priority?
Status: Beta
Brought to you by:
acassen
|
From: Damien C. <dam...@co...> - 2018-08-23 12:40:00
|
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 > Kee...@li... > https://lists.sourceforge.net/lists/listinfo/keepalived-devel -- Damien Clabaut R&D vRouter OVH |