Monitoring Your Znuny Ticketsystem - Part I
Like with every other application, it's essential to know how your Znuny instance is doing. Besides the technical health of the server that your Linux administrators should be aware of, there are more things to check for when running a Znuny instance.
We use Icinga2 to monitor our infrastructure, internal development server, and hosted Znuny instances. There are many other monitoring systems like Nagios, CheckMK, etc. It does not matter which one you use, but it matters that you use one.
Disks, Partitions, and more
There is more to a disk than the available space. When you save the plain emails and attachments in the filesystem instead of the database, you should also consider monitoring the available inodes. Inodes are required to hold the files' metadata, and using ArticleStorageFS needs a lot of them.
Accessing the GUI
Using Znuny means accessing it through a browser. And this needs a running web server. The list of what should be checked is not that long, but we recommend answering the following questions with your monitoring solution:
- Is the web server running, and will the service automatically start after a reboot (systemd)?
- Is there a valid SSL/TLS certificate to ensure a secure connection?
- Will users accessing the front end with http be redirected to https?
- Are there any problems logged in the web server's error log?
A proper running instance requires that the Znuny daemon is running. The daemon is typically started via cron. This requires a correct crontab for the Znuny user. When running, there should be six Perl processes executed by the Znuny user.
Digital messages, a.k.a. email
Most of the communication with customers is done by email.
For sending and fetching emails from mailboxes, the Znuny daemon must run. The last point covers this.
For high-volume systems or when you prefer to receive new emails immediately, it is possible to have them accepted by SMTP. In this case, the local MTA receives them via SMTP and passes them via procmail to Znuny. Check that the
MTA is running, the firewall allows inbound SMTP connections, and your .procmailrc file has the correct permissions. The SetPermission.pl script sets the permission. You should check that they stay at 0640.
Sometimes, an incoming email can't be processed. These emails are usually saved in the directory var/spool under the Znuny home directory. You should check if any files are older than 24 hours in this directory. Why 24 hours? One of the recurrent cron tasks is executed once a day and tries to process these emails again. If that fails, manual action is the next step.
What's next? In Part II, we show how the open-source add-on HealthStatus brings your monitoring to the next level.