This is a Matt-Cloud Ansible Role that deploys the Cosmostat service. This service is both the Centralized Observability Dashboard as well as the local agent and local Observability Dashboard. These options are all configured through the Role Variables, as well as the Jenkins Playbook options.

The Client service can either just report metrics back to the server, or it can also provide a local dashboard with just the local details.

The Server service listens on an API for authorized requests for Client endpoint creation and updating.

The service itself is a python app. This app has an API for creating and managing a System object which then creates Component objects and refreshes them periodically. There is an API for querying this data, and the data is also published to a redis channel. The server version adds a Cosmostat Server Object to maintain a list of all remote Client properties and metrics.

This also has a web dashboard which is built from a stack of Node.js, PHP, and nginx. The Node.js server handles the websocket, the PHP renders the HTML, and the nginx container proxies it all together. Since I'm old I use PHP to generate HTML, but I also want to have live udpating data on my dashboard. I found that I can proxy together Node.js and PHP to accomplish this goal. Right now this is a stack of several Docker containers, but I intend to update this to be a single custom Docker image.

The Server Dashboard has a sidebar with a list of all active endpoints. The status bubble changes color when the endpoint data gets stale, and is purged after 60 seconds of no udpates. Clicking on a hostname changes the focus of the main data, and further component details are available in a hidden container to keep the home page cleaner.

The docker stack uses a local network on the 192.168.37.0/24 subnet, and keeps all traffic within this subnet by default, meaning that the dashboard can only be accessed locally at port 80 on 192.168.37.1. This is controlled by the secure_api variable, setting this to False exposes the API and Dashboard on 0.0.0.0.

The Ansible role is written to be self-contained, and should not need anything special from any other Matt-Cloud Roles to be ran. I have the API Key stored in a Jenkins secret and that secret is used for deployment to all my endpoint clients as well as server to keep it the same. I have that varaible set to a big random string in this by default to make sure that, if anyone else every did use it, then they wouldn't have a server with a known default API key set.

Description
Matt-Cloud Metrics Dashboard
Readme 467 KiB
Languages
Python 33.1%
PHP 28.8%
JavaScript 26.3%
CSS 10.1%
Dockerfile 1.3%
Other 0.4%