1

I use the Debian based Ubuntu 16.04 server to run an Nginx webserver with a few WordPress sites. This is small personal server environment (I pay 5 USDs for the minimal plan with 1 CPU core, 20GB disk space and 1gb RAM).

I need a simple, FOSS, payless, software with minimal configuration which generates a monthly report (fed by mail to my Gmail account) about the situation of the server like in:

  • Low disk space (say, I reached above 75% of disk space).
  • Non-200 http status codes for webpages of my sites.

And maybe some more issues. I don't really know what's important to check monthly (besides security issues, but the program I look for in this case shouldn't report on security issues, only on general technical states as the two above and others you see as very important to prevent crashes).

  • Just for clarification, as it sounds a bit confusing: you want to analyze your email – or the software should send reports by mail? – Izzy Jan 15 '18 at 6:55
  • The software should send reports to my email (Gmail). – Arcticooling Jan 15 '18 at 8:22
  • Thanks, rephrased accordingly (second paragraph, please cross-check I got that right now). – Izzy Jan 15 '18 at 11:23
  • Izzy, I hope you didn't mean from Linux local mail to Gmail mail, because I truncate the Linux mail daily from crontab as it gets enormous daily even that it's a minimal environment. I just basically don't use that. – Arcticooling Jan 15 '18 at 11:28
  • I didn't mention local mail at all. Usually such "reporters" contact an SMTP server; so if the recipient is "off-site", so goes the mail. No copy left in your local mailbox folder. But if you already have a tool reporting there, it's easy to make your local system forward that elsewhere by editing your /etc/aliases appropriately (e.g. an entry root: johndoe@example.com would cause all mail directed to root being sent to johndoe – and nobody: /dev/null would discard all mail to nobody). – Izzy Jan 15 '18 at 11:41
2

If you are willing to invest a lot of time into this, you could setup use a Nagios service. It's also available as a debian package. Then you have access to various dashboards, for example one that looks like this:

Nagios dashboard

Nagios also can create reports - either by clicking through the GUI or by calling preconfigured report templates.

Nagios also can send mail (labeled "Warning" or "Critical" when your service exceeds certain thresholds).

Nagios has a few forks, check out for yourself what's considered cool these days.

|improve this answer|||||
0

Sounds like you are using linode.com :) I like 'em too.

In the linode control panel you can set disk space warnings, etc. For non-200 status codes, etc. you can just write a little script that searches your access.log for them (or perhaps just the error.log) and emails you a report/notification

You may want to consider setting up some other intrusion/attempt detection software like fail2ban

|improve this answer|||||
  • Thanks, I use a similar service - DigitalOcean. They a have their own software solution one needs to download and install and than configure per needs but I'm looking for something out of box, something with quite trivial options for common small server environments (assuming there is one) mainly because I want to save lines in the already-long server installation script. Maybe writing a module is a good option though I would need to learn more regex for that. – Arcticooling Jan 15 '18 at 8:20
0
+50

My preferred options for this are monit for service supervision and netdata for resource tracking.

Monit is a minimalistic service supervision and health-checking tool with a dead-simple configuration format. It can do the usual service supervision stuff (restart a program if it stops running, send e-mail alerts when an error occurs, etc), but it also has a bunch of other useful checks built-in (you can easily use it to verify HTTP return codes for arbitrary paths on your web server) and allows for interdependency of checks (for example, you can have it monitor the state of a network interface, and then only try to check a network filesystem's status over that connection if the interface is up). It's also tiny in terms of resource usage (the instance on my home server, which has about 50 checks it runs every minute uses only about 4MB of memory and a miniscule amount of CPU time when it runs the checks), and it has a nice simple web dashboard you can see status of everything on which is trivial to proxy through nginx.

Netdata is in contrast oriented towards tracking performance metrics, but it also has a health-checking framework that will let you send alerts through a bunch of different messaging services (including email and SMS, as well as a bunch of others) if tracked metrics go outside certain bounds. By default, it tracks a bunch of basic stuff without needing any user intervention, and it has plugins for a bunch of different server applications (including nginx) that are easy to set up. It also ships with a bunch of really useful checks by default (including a rather neat one which figures out based on how fast space usage is increasing if a filesystem is likely to fill up in the next 48 hours). It's also really lightweight (I've got it set to track 12 hours of metrics on the same server mentioned above, and it's only using about half a GB of RAM, and the original install before I bumped things up from the 1 hour default tracking window and enabled other plugins needed only about 15MB), and has a web interface that's also insanely easy to proxy through nginx.

Note that together, the two of these can do the same types of things for a single host that the big-name network monitoring solutions like Nagios, Ganglia, or Munin do for entire networks, with a lot less work involved in the configuration.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.