copper-engine / copper-monitoring

Monitoring GUI and server for COPPER
Apache License 2.0
5 stars 4 forks source link

copper-monitoring

Monitoring GUI and server for use with COPPER 5

Feature Overview

Installation

Download the Copper-Monitoring source code from GitHub here: https://github.com/copper-engine/copper-monitoring

Or pull a Docker image with: docker pull copperengine/copper-monitoring

Set up with Docker

To build and zip the source code for Docker to use, simply run the following commands: Linux: ./start.sh --prep-docker && ./start.sh --dockerize Windows: ./start.cmd --dockerize This will build and store the zipped source code in the /docker folder.

Next, check the default Dockerfile, as you may want to change certain enviornmental variables such as which credentials are required to log into the GUI, or what the default JMX credentials are. Note: The Environment Variable MONITORING_AUTH sets the required credentials to log into the GUI. The default username / password is ‘admin’ : ‘admin’.

To create a Docker image from the zipped source code, run the following command from inside the /docker folder: docker build -t copper-monitoring ./

To create a container from your image run the following command: docker create -p {nnnn}:8080 copper-monitoring Where {nnnn} is a port of your choice to forward to your container. 'copper-monitoring' is a user defined name.

Alternativley, if you have pulled an image from Dockerhub, you can edit the enviornmental variables when creating a container. A default enviornmental variable file can be found here: https://github.com/copper-engine/copper-monitoring/tree/master/docker/env-vars/env.list Or in the source code at docker/env-vars.

Edit the variables as you wish, and build the container with the following command: docker create -p {nnnn}:8080 --env-file {path to env.list} copper-monitoring Where {nnnn} is a port of your choice to forward to your container. 'copper-monitoring' is a user defined name.

Finally run your container with your container id by: docker start {id}

NOTE on 'localhost': By default, inside a container we are not able to access localhost as host. If you would like to access services on your machine's localhost, take one of these approaches based on your OS:

Linux: Create your container with the --network="host" tag, and then use 'localhost' which will be directed to your host machine. docker create --network="host" {image name} Note, you can no longer forward ports in this network mode. Access the Copper Monitoring application through it's default port, '8080'.

Windows: Use host.docker.internal

Using scripts

Linux:

Windows:

Server

Server is a simple proxy for JMX based on Jolokia and Grizzly server. It uses Jolokia to handle JMX calls to your Copper Application.

Note that your Copper Application should be running with JMX and a JMX port exposed. Take the following VM parameters for example: -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.ssl=false

If you want to protect your exposed JMX port with credentials, use this alternative option: -Dcom.sun.management.jmxremote.authenticate=true And set your desired credentials in Java/jdk/jre/lib/management with the jmxremote.password file. For more information, see: https://docs.oracle.com/javase/8/docs/technotes/guides/management/agent.html

Client

The Copper Monitoring GUI is a web application that uses JMX to query real time statistics from an application using the Copper Engine.The monitoring application queries and displays this information, and offers the user some interactive functionality with the engine as well. The application is able to connect to more than one application in an app-cluster, and show information from all engines. Engines with the same 'engineClusterId' are grouped together visually for clarity.

App uses Vue.js with TypeScript and Vuetify as base.

License

Copyright 2002-2018 Copper Engine Development Team

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

To get check licenses of other third party libraries that we use in our client part, you can use https://www.npmjs.com/package/license-checker or any other alternative. For server part you can use gradle downloadLicenses command and then see report at copper-monitoring/server/build/reports/license/dependency-license.html