Hi @marbaa
OK, now I get what you mean, and what your initially posted problem is. As far as I understand, I have to say that your āissueā is more of a ācosmeticā nature. I believe that this can easily be overcome by good internal documentation and communication regarding this particular check, butā¦ I may be wrong. I know: people can be weird, and not be able to ātolerateā this āduplicated outputā. Seriously though: Is that such a big deal?
In any case, I did some very brief research about MapR and what I found, is perhaps not really news to you, but that thing has apparently its own CLI (maprcli
) one could probably (ab)use to write a check that will do what you want:
https://docs.datafabric.hpe.com/62/ReferenceGuide/maprcli-REST-API-Syntax.html
There is a myriad of commands, such as node list
or dashboard info
which do look usefulā¦ maybe others, too. Iām sure as someone who is working with that thing, such as yourself, youāll have some experience with it, and will be able to find the right combination of commands to achieve what you want: It shouldnāt be too hard to do.
In summary
What you need to code into your script - whether you want to use it as local check or via MRPE - is some sort of condition, that, in case both your nodes are active, only generates the output you posted above, on one of themā¦ which is what Andreas already said above. This shouldnāt lead to those āpeskyā duplicates anymore.
I wanted to add that you will not find any documentation on how to do that, because it strictly depends on the application you want to write it for (in your case: that MapR thingieā¦): Without wanting to sound rude, you will need to come up with the logic. Again, the existing CLI toolbox should provide plenty of stuff to play around with.
Oh and by the way - quoting myself - the tip to use
does do something useful, butā¦ perhaps not for your case, so Iām sorry if I misled you with that advice. With all that said, I sincerely hope that you will come up with a satisfying solution for your issue, and please do post your results: Iām sure they will provide helpful advice for similar issues others haveā¦
Thomas