i've 4 gateway instance (in cf 2016) to send SMS via SMTP, i would like to build a "Back Office" interface to monitoring this and know if they are running or not, without use CF Administation .
It's possible ?
If Yes in wich mode ?
Thank's to everybody
CF being Java and tomcat underneath you could enable Java management extensions on each CF then use Java mission control (JMC JDK 8 tool) or jconsole (JDK8 and 11) to monitor CF Java heaps and threads.
Gianlucam, you can do many aspects of such monitoring using the same adminapi that I discussed when you asked a similar question in another thread earlier this week. I replied there with details, but you never responded:
Could you please respond to both, in addition to considering what Carl offered?
You may also wnat to clarfiy what specifically you want to "monitor" about the gw instances, but as I said in that other reply, the Admin API has get methods that may well give you all you need.
And please don't ask whether the admin api methods will give you what you want. As I said in the other thread, since I don't have a running gw instance, I can't readily tell. But you could, if you take just a few mins to setup the calls to the adminapi methods and cfdump their results.
Do let us know how it goes. It may benefit future readers looking for such gw monitoring.
THAT'S PERFECT !!
Works like a charms.. but i must to use admin autentications ..it's potential dangerous ??
Good to hear that it could work. And yes, it's true that most (though not all) methods in the adminapi do require that you first run the login method of the admin.cfc, providing the admin password. And of course you should be ware of storing that in clear-text, such as in the code doing that login--in case somehow someone could see the code but should not know that password.
And normally I would tell someone writing admin api code to just prompt for the admin password, and store it and use it in a session variable.
But you raise a good point that if you want this to run constantly as a monitor, then you'd really need to store the admin password to use in launching the monitor automatically. As for how to do that safely, that's really an entirely different topic. There's no single best solution.
If you raised a new question about that, you may get participation from people with various good ideas for that. It shouldn't take more than a paragraph to describe the need. If I get around to documenting alternative solutions, I'll try to remember to come back here and note that. Or a future reader can offer a reply and that should toggle me. 🙂