[ClusterLabs] Best way to obtain timestamp when node was set to "standby"

Digimer lists at alteeve.ca
Tue Oct 20 23:01:48 EDT 2020


On 2020-10-20 8:23 p.m., Dirk Gassen wrote:
> Hi Alltogether,
> 
> What would be the best way to obtain since when a node is in the current
> state, preferably from a script.
> 
> For example, I can see that a node is in standby but I would like to
> know when this happened without looking at logs or at individual files
> in /var/lib/pacemaker/pengine/
> 
> Currently using pacemaker 1.1.18 and corosync 2.4.3.
> 
> Dirk

I don't think this is supported internally.

Off hand, I would suggest you could look at the historical cib.xml files
(the old versions are stored as cib.xml.XX, iirc). If you can find the
file where the transition you're interested in happened, you could look
at the files mtime to get an idea of when it happened.

You could also parse the system logs, if the event you're curious about
happened recently enough.

Just a couple ideas, not sure how well they'd work in practice.

-- 
Digimer
Papers and Projects: https://alteeve.com/w/
"I am, somehow, less interested in the weight and convolutions of
Einstein’s brain than in the near certainty that people of equal talent
have lived and died in cotton fields and sweatshops." - Stephen Jay Gould


More information about the Users mailing list