A quick update, showcasing another new feature for the upcoming version of Leaf Node Monitoring (v2022.02), responsive layouts.
The previous version has a set width/height for the host cards and check tiles, in a big long column, just 1 row. Widen the window, host cards also widen. With this change, the host cards no longer automatically widen, but once the window is big enough, 2 rows will appear.
Here is a GIF showcasing the new responsive behavior:
(stuttering is due to the GIF screen recording, actual app performs way better)
The old layout just became as wide as the screen:
I’ve added a collapsible menu right on the monitoring screen so you can resize and directly see the result. The new options are also available in the settings screen.
This responsive layout feature was requested by a user that runs Leaf Node Monitoring on a tablet and wanted to use the screen real estate better.
The technical details on how to make a responsive QML layout can be found here: https://raymii.org/s/articles/Responsive_Qml_layout_with_scrollbars.html – Using QML layouts, I can dynamically add or remove columns or rows in the grid layout that holds either the host cards or check tiles. I also added a short animation on resize, as eye candy and also because QML makes that so easy.
One more sneak peek
I’ve also added a right-click menu to the tray icon with a few useful features:
In my spare time I’m slowly working on the next version of Leaf Node Monitoring. Sales have been above expectation and I have many more ideas I want to implement. Had quite some positive feedback, thanks to all of you who wrote in.
External Process checks
One of the big new features in the next release (v2022.02) will be external processes as monitor checks. Here is a screenshot of two external checks on Android:
You might notice that they’re orange, which means warning status. You might also notice the visual changes, rounded corners and other small tweaks. External processes are simple checks that are successful (OK) when the exit code is 0 and critical otherwise. In this case, they’re warning because some errors, like a nonexistent binary, do not trigger critical (since, no exit code is not the same as exit code > 0).
External processes allow you to have many more checks. I use the checks from Nagios / Icinga, available via https://www.monitoring-plugins.org/, which extend the functionality of Leaf Node Monitoring by a huge amount. I will still continue to implement new checks in native C++, both for speed and cross-platform functionality, but this feature will help in all the cases where there are no checks yet.
The next new feature is retry attempts. For all checks currently, like the TCP port or HTTP check I’m implementing an automated retry. Currently 4 times, but I might make that configurable in the future. If a check fails, it will be retried with the same parameters. No back-off timer or pause in between yet. I’ve been running LeafNodeMonitoring myself and have noticed some notifications which were flaky tests, with the automated retries I hope to have less of those.
The last new thing is that I’ve begun to add unit tests. For most of my private projects I don’t do unit tests since they’re not worth the time/effort. At work they’re required and we have automated checks that reject merge requests when there is not enough coverage. Unit tests are not user facing, but they do help in delivering better software. With the growing amount of checks and logic, I am now of the opinion that Leaf Node Monitoring benefits from tests. Since I’m used to write code that can be tested (small methods, decoupled, dependency injected, etc), it does not require any refactoring, I’m noticing most of the code is already testable just fine.
Here is an example test that checks if the new external process code fires off the correct signals and returns the correct result when it receives an exit code of 0:
The constructor and destructor of this test suite handle the deletion of the pointers and further cleanup, so don’t worry about the naked new.
It’s always hard to test external programs like this, as is testing time-related stuff (without a lot of stubs/mocks). I’m using the googletest framework since I’m used to it. It requires a bit of shoehorning to make it works with Qt but once your project is setup correctly it’s a breeze to use. I had to convert the one project to three projects (a library, an application and a test-app) using SUBDIRS in qmake and linking to the library in the main application. Not rocket science, but I imagine it can be hard to do if you don’t know what to look for.
Code coverage is now up to 57% so that’s a great start.
That’s all for this post, I’m not sure when the next version is going to be released, but it will be a free update for all of you who purchased it. If you have any feature requests, issues or want to let me know something, don’t hesitate to contact me.
Leaf Node Monitoring is now available in the Google Play store. I did not expect the app review to be done so quickly, for my other app, WeatherTerminal, which I uploaded as a test to get the store account in order, took more than a week to review, Monitoring was done in two days, and it’s a way more complex app.
If you purchase via the Google Play store, you don’t get the Linux version or the Windows version, only the Android version. The app can export its own source code, so you can build the other versions if you want, but it is a bit more trouble than if you buy the regular version. The play store version also does not allow you to choose your own price as the regular version does. But still, it’s available to any Android phone via the built in secure store, so that’s a big thing!
I’ve just finished up the first release of Leaf Node Monitoring, yay! A simple monitoring program, perfect on your desktop, unobtrusive, to keep an eye on your sites and servers. Written in C++ & Qt 5, licensed under the GNU GPLv3.
I’m preparing the first initial release of Leaf Node Monitoring. After writing afewarticles on the plans and licensing details, I’ve now almost finished the last things I wanted to do before the initial release. I’ve got a rather large TODO list but the feature set I have now is enough to get a version out of the door.
The installer for Windows is finished, using InnoSetup, a few details like app name/ icon / version in the binary on Windows are done and for most Linux versions I’ve got an AppImage with Qt statically compiled. Runs on Ubuntu 18.04 and up, and of course the source will be delivered to customers, so they can compile it Leaf Node Monitoring themselves on any distro.
Business details are sorted as well, including payment provider, website and not having to register as a company due to not wanting to make a profit, kind of a grey area, but probably fine.
Last but not least, the colour scheme is toned down a bit and I’ve implemented a simple version check in the app, which will show a message if a new version is available. You can turn this message off via the settings. Here is a video showing that setting and the version check. I like the little animation the green bar has, the GIF recording does not show that particularly well:
No cryptographic signing or transport layer security is used. To complex for a first version and I can always add that later. The notification is on by default, but I’m doubting if I keep it that way. If you have any thoughts regarding a default update notification, please let me know.
Please also send me any other thoughts and comments. Not sure on the time frame of the release, but as far as technical things, almost ready.