Roland Kammerer <[email protected]> > > which tool should I rely in the future? will "drbdadm status" stable > > or I should monitor "drbdsetup events2"? > > IMO drbdsetup events2 and drbdsetup status --json are good candidates > that we don't break just for fun, actually the opposite, we really try > to not break them. "status --json" has the advantage, that well, it is > already json and not something self invented. For events2 you would need > to write some "parser" and if it only is grep to process events. > > Being biased, I'd say for "serious monitoring" you should eventually use > one of drbdd's plugins, I expect prometheus.io integration very soon. > For hackish self written scripts: events2, better 'status --json'. It > depends how you monitoring looks like. If you just try to detect state > changes like a resource is disconnected, or that the disk state changes > from "foo" to "bar", that will land in drbdd very soon. I hope to > release RC1 early next week. Then you will be able to write rules for > almost arbitrary DRBD event changes like this: > [[umh]] > [[umh.resource]] > name = "resource now primary" > command = "/usr/local/bin/primary.sh" > resource-name = "foo" > old.role = "Secondary" > new.role = "Primary"
thanks a lot for the detailed explanation! it's amazing what drbdd can do. I need to think about what can we do with this capability. some of our scripts are working under pacemaker to add specific functions for our need. I think I will use "drbdsetup status --json" to rewrite them. thanks again for your kindly help! _______________________________________________ Star us on GITHUB: https://github.com/LINBIT drbd-user mailing list [email protected] https://lists.linbit.com/mailman/listinfo/drbd-user
