Server monitors

Created on 8 August, 2024Guides • 3 minutes read

Server monitoring is a slightly different solution than monitoring services or DNS. For both services and DNS, the servers send queries to the addresses you indicate. In this case, your server will send requests to the VirtualEyes application. At periodic intervals, a special script will collect basic data about the server status (CPU load, RAM usage, disk usage, and current network connection usage) and send them to VirtualEyes, so that you can check its status in a simple and pleasant way. Additionally, you can set alerts for each metric. For example, you can add a notification if disk usage exceeds 90%. Thanks to this, you will always know in time that it's time to clean up the server.

ATTENTION! Server monitoring only works for GNU/Linux-based servers with the location set to en_US and the available commands: top, free, df, awk, wget, and curl.

Adding monitoring

Go to the "Server monitors" section and click the "Create server monitor" button. The name field is a short description of your service that will be displayed in many places. Let it be a friendly name that is easy for you to recognize. In this example, I named the monitoring "Test server". The next field is the IP address. Here you can enter anything, but we recommend that this be the IP address of the server that will be sending the data. This will make it easier for you to identify the actual server. The last option is to set the frequency of sending data by the server. Here you can choose (depending on your package) from 1 to 30 minutes. The more frequent the check, the faster you will be able to detect anomalies on your server.

After clicking the "Create" button, you will be redirected to a screen where charts with data from your server will be displayed in the future. At the moment, it is empty. At the top you will find two buttons - "Install" and "Uninstall". After clicking the "Install" button, a window will open with information on what to do to start collecting data. In short - log in to your server using the SSH protocol and execute the command displayed. It is important not to miss any characters - otherwise the script may not work properly. Remember that some shared hostings, despite access via SSH, may not have / do not provide permissions to execute the necessary commands. It is recommended to use this solution on VPS/dedicated/cloud servers. The copied command adds a simple script to the cron service that collects data. Clicking the "Uninstall" button will supposedly display a window - the command will be similar, but it will be used to remove the script from your server's cron service.

Edit

Now go back to the server monitoring edit page. You can always do this by clicking the context menu and selecting "Edit". This option is available both on the summary page and on the list of your monitored servers for each service.

Once you enter edit mode, you will notice that the form looks almost exactly like when adding a service. There is a new checkbox that allows you to disable server checking. Disabling monitoring will block the VirtualEyes application from receiving data. If you have a package that allows access to the API, you can automate this operation by including it in your CI/CD process.

Advanced settings

Both when adding and editing monitoring, you see the "Advanced settings" button on the form. It allows for more precise configuration. After clicking, you will see additional options:

  • Alerts - allow you to send notifications via a selected channel depending on the parameters you set. You can set an alert for CPU load, RAM and disk usage. There are two rules available - "higher than" and "lower than". The values ​​you enter are percentage references. The "Run after X checks" field allows you to make sure that a given problem did not occur only temporarily - e.g. the CPU load did not increase only for a moment. It is worth setting this field to e.g. 3 checks. This will avoid false alarms. It is worth considering different values ​​for different scenarios.
  • Notifications - select the channels through which you will receive the alert notification. ATTENTION! If you do not select any - you will not receive information about the configured alert!
  • Project - thanks to this option you can connect server monitoring to the selected project.


Now you know all the possibilities and configuration options available for server monitoring in the VirtualEyes application. Regardless of whether you have a small VPS server or an advanced dedicated server - you will be able to monitor the status of your server. In case of doubts, you can always contact me using the "Contact" tab.