Statusengine UI is a lightweight, responsive, modern web interface, you can use, to make your monitoring data visable.
Please select your operating system first. If your operating system is not in the list, pick the operating system version that matches your operating system best. You can still install Statusengine on your system, even if it is not in the list.
Check out the tutorial, of how to install php composer, if you don't have it installed to your system yet.
yum install epel-release yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm yum check-update yum install yum-utils yum-config-manager --enable remi-php72
yum install epel-release yum install http://rpms.remirepo.net/enterprise/remi-release-8.rpm yum check-update dnf module reset php dnf module install php:remi-7.3
{[{commands[selectedOs].dependencies}]}
cd /usr/share/ git clone https://github.com/statusengine/interface.git statusengine-ui cd /usr/share/statusengine-ui chmod +x bin/* composer install
Due to the fact that the Statusengine UI Config file has a lot of options you may be don't need, I striped this down to the basics you need to change.
Statusengine Ui can also be configured through environment variables. This can be handy if you want to run Statusengine Ui inside of Docker. See the list of environment variables for more information.
If you are going to use CrateDB you can ignore all MySQL settings and vice vera.
Copy example configuration
cp /usr/share/statusengine-ui/etc/config.yml.example /usr/share/statusengine-ui/etc/config.yml
auth_type
use_mysql
mysql username
mysql password
mysql database
use_crate
crate nodes
If you are using Statusengine basic auth, you need to create a user first.
This can be done, via the Statusengine UI Console
/usr/share/statusengine-ui/bin/Console.php users add --username "admin" --password "admin"Read more about users in the Manage Users section.
apt-get install ssl-cert
I have no idea, how secure this certificate really is! Do not use it in production, it's just to make clear how things would work. Use Let's Encrypt to get free TLS certificates.
mkdir /etc/ssl/private openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/ssl-cert-snakeoil.key -out /etc/ssl/certs/ssl-cert-snakeoil.pem openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 cat /etc/ssl/certs/dhparam.pem | tee -a /etc/ssl/certs/ssl-cert-snakeoil.pem
In this example the web server is listen to the address 192.168.56.101
and we create a virtual host for the subdomain statusengine.example.org
{[{commands[selectedOs].apache2}]}We place the configuration for Statusengine UI to
{[{apacheConfig}]}
<VirtualHost 192.168.56.101:80>
ServerName statusengine.example.org
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L]
DocumentRoot "/usr/share/statusengine-ui/public/"
RedirectMatch 404 /\.git
ErrorLog "/var/log/apache2/statusengine-ui-error.log"
CustomLog "/var/log/apache2/statusengine-ui-access.log" combined
</VirtualHost>
<VirtualHost 192.168.56.101:443>
ServerName statusengine.example.org
RedirectMatch 404 /\.git
DocumentRoot "/usr/share/statusengine-ui/public/"
SSLEngine On
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
ErrorLog "/var/log/apache2/statusengine-ui-error.log"
CustomLog "/var/log/apache2/statusengine-ui-access.log" combined
</VirtualHost>
a2ensite statusengine-ui a2enmod rewrite a2enmod ssl {[{commands[selectedOs].apache2Restart}]}
rm /etc/httpd/conf.d/welcome.conf mkdir /var/log/apache2 echo "LoadModule rewrite_module modules/mod_rewrite.so" >> /etc/httpd/conf.modules.d/00-base.conf echo "<Directory /usr/share/statusengine-ui/public>" >> {[{apacheConfig}]} echo " Require all granted" >> {[{apacheConfig}]} echo "</Directory>" >> {[{apacheConfig}]} {[{commands[selectedOs].apache2Restart}]}
In this example the web server is listen to the address 192.168.56.101
and we create a virtual host for the subdomain statusengine.example.org
{[{commands[selectedOs].nginx}]}
Notice: We are using php-fpm over a TCP socket!
By default php-fpm will use a Unix socket, so you have to change the following
line in the file
{[{commands[selectedOs].fpmConfigPath}]}
and restart the php-fpm service.
;Remove this line - or make it became a comment
;listen = /run/php/php7.2-fpm.sock
; Add this line to use TCP
listen = 127.0.0.1:9000
{[{commands[selectedOs].phpFpmRestart}]}We place the configuration for Statusengine UI to
{[{nginxConfig}]}
server {
#Redirect http to https
listen 80;
server_name statusengine.example.org;
server_tokens off;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name statusengine.example.org;
server_tokens off;
ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem;
ssl_certificate_key /etc/ssl/private/ssl-cert-snakeoil.key;
root /usr/share/statusengine-ui/public/;
index index.html;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
location ~ \index.php {
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root/api/index.php;
fastcgi_param SCRIPT_NAME /api/index.php;
fastcgi_param PHP_SELF $document_uri;
}
location ~ /\.git {
deny all;
}
# Remove css, js, and images from access log
location ~* \.(?:css|js|svg|gif|png|html|ttf|ico|jpg|jpeg)$ {
access_log off;
}
}
Enable the configuration and restart the web server
rm /etc/nginx/sites-enabled/default ln -s /etc/nginx/sites-available/statusengine-ui /etc/nginx/sites-enabled/statusengine-ui {[{commands[selectedOs].nginxRestart}]}Remove the server defenition from
/etc/nginx/nginx.conf
{[{commands[selectedOs].nginxRestart}]}
You can also use the PHP build-in web server, for example if you are in a Docker environment
php -S 0.0.0.0:80 -t /usr/share/statusengine-ui/publicBefore start using the PHP build-in web server, take a look at: http://php.net/manual/en/features.commandline.webserver.php
To manage the users of Statusengine UI Basic Auth, you need to use
the CLI Tool provided by Statusengine.
Managing Users via the Interface is NOT possible at the moment.
You can access the Statusengine UI User Console, with the following command
/usr/share/statusengine-ui/bin/Console.php users
Create a new user:
If you call the add
action without parameters, the shell will be
spawn in an interactive mode and ask for username and password.
Create a new user - non interactive:
If you call the add
action with the parameters --username
and --password
the new user will be created in non interactive
mode and without any questions.
This is useful for automatisation (e.g. Ansible)
Delete a user:
Call the delete
action to remove users.
In interactive mode, Statusengine UI will autocomplete usernames.
List users:
Call the list
action to get a list of all available users.
All actions can be called in interactive or non interactive mode!
As alway --help
is your friend
Statusengine UI allow to set some user specific settings to the interface. All settings are saved in the local storage of your browser!
I also try to add not too much options.
If you had installed Statusengine UI through git
, the update will be done quickly.
cp -r /usr/share/statusengine-ui /some/backup/path
cd /usr/share/statusengine-ui git pull origin master composer update
vimdiff /usr/share/statusengine-ui/etc/config.yml /usr/share/statusengine-ui/etc/config.yml.example