Public | Automated Build

Last pushed: 2 years ago
Short Description
Ready to use nagios container preconfigured to monitor a Skylable SX cluster
Full Description

SX Console

sxmonitor dockerized

Generate SSL cert and key

openssl genrsa -out ca.key 2048 
openssl req -new -key ca.key -out ca.csr
openssl x509 -req -days 3650 -in ca.csr -signkey ca.key -out ca.crt
cp ca.crt /data/sxmonitor/cert.pem
cp ca.key /data/sxmonitor/key.pem

Provide an account on SX

Create a volume called 'sxmonitor'.

Create the sxmonitor user with read access to all the volumes that you want to
monitor and read+write access to the 'sxmonitor' volume.

$ sxacl useradd sxmonitor sx://admin@clustername
$ sxvol create -r 3 -s 1G -o sxmonitor sx://admin@clustername/sxmonitor
$ sxacl volperm --grant=read sxmonitor sx://admin@clustername/vol1
$ sxacl volperm --grant=read sxmonitor sx://admin@clustername/vol2
$ sxacl volperm --grant=read sxmonitor sx://admin@clustername/volN

Obtain the key for this user:

$ sxacl usergetkey sxmonitor sx://admin@clustername

Store the key into /data/sxmonitor/admin.key

Start and configure your container

By default nagios listens on port 443. Use the -p option to map it to a port on the Docker host.

docker run -v /data/sxmonitor:/data \
    -p 9443:443 \
    --name=sxmonitor \
    --restart=always -d \
    -e CLUSTER_NAME=clustername -e CLUSTER_PORT=443 -e -e SMTP_ADDRESS=smtp.mail.tld \

Email alerts will be sent to using the smtp.mail.tld mail

Set the web password

Access to nagios is protected with basic auth.
Create an account for yourself with:

/usr/bin/htpasswd -c /data/sxmonitor/htpasswd nagiosadmin


docker pull skylable/sxmonitor
docker stop sxmonitor
docker rm sxmonitor
docker start sxmonitor

More info

Nagios plugin home-page:

Docker Pull Command
Source Repository