update readme & action

This commit is contained in:
IgorKha 2021-10-14 01:02:09 +03:00
parent 2bf08a3575
commit 101c1342ee
No known key found for this signature in database
GPG key ID: F283C5AB2D59E902
2 changed files with 38 additions and 29 deletions

View file

@ -1,11 +1,11 @@
name: simple test name: deploy
on:
push: on: [push, pull_request]
branches: master
jobs: jobs:
lint: lint:
name: lint
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
@ -16,9 +16,9 @@ jobs:
severity: "warning, error" severity: "warning, error"
test: test:
name: test
needs: lint needs: lint
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: deploy with sh script - name: deploy with sh script
run: sh -c "$(curl -fsSL https://raw.githubusercontent.com/IgorKha/Grafana-Mikrotik/master/run.sh)" "" run: sh -c "$(curl -fsSL https://raw.githubusercontent.com/IgorKha/Grafana-Mikrotik/master/run.sh)" ""

View file

@ -1,50 +1,59 @@
# Grafana-Mikrotik # Grafana-Mikrotik
![visitors](https://visitor-badge.laobi.icu/badge?page_id=IgorKha.Grafana-Mikrotik) ![visitors](https://visitor-badge.laobi.icu/badge?page_id=IgorKha.Grafana-Mikrotik)
![example branch parameter](https://github.com/IgorKha/Grafana-Mikrotik/actions/workflows/action.yml/badge.svg?branch=master)
![mikrotikOS](https://img.shields.io/badge/Mikrotik_ROS-v6.49-blue)
![Grafana](https://img.shields.io/badge/Grafana-v8.1.7-orange?logo=grafana)
![Prometheus](https://img.shields.io/badge/Prometheus-v2.30.3-red?logo=prometheus)
![snmp_exporter](https://img.shields.io/badge/snmp__exporter-v0.20.0-red?logo=prometheus)
[![Donate using Liberapay](https://liberapay.com/assets/widgets/donate.svg)](https://liberapay.com/~1772367/donate) [![Donate using Liberapay](https://liberapay.com/assets/widgets/donate.svg)](https://liberapay.com/~1772367/donate)
Grafana dashboard for Mikrotik/routerOS. [prometheus/snmp_exporter](https://github.com/prometheus/snmp_exporter) -----------
| | ver. |
|---|---|
| snmp_exporter | `>=0.20.0` |
| Grafana | `>=8.1.7` |
## 🐳 Deploy with docker-compose ## 🐳 Deploy with docker-compose
### deploy with sh script ### Deploy with sh script
```console ```console
sh -c "$(curl -fsSL https://raw.githubusercontent.com/IgorKha/Grafana-Mikrotik/master/run.sh)" "" --config sh -c "$(curl -fsSL https://raw.githubusercontent.com/IgorKha/Grafana-Mikrotik/master/run.sh)" "" --config
``` ```
> You can also pass some arguments to script to set some these options:
> ```console
> --config: change the user and password to grafana and specify the mikrotik IP address You can also pass some arguments to script to set some these options:
>
> stop: stop docker containers --config: change the user and password to grafana and specify the mikrotik IP address
>
> --help stop: stop docker containers
>
>For example: --help
> ```
> sh run.sh --config
For example:
```console
sh run.sh --config
```
[![asciicast](https://asciinema.org/a/nOhuc7LvI6bRWbg7dcvqFQ4Kc.png)](https://asciinema.org/a/nOhuc7LvI6bRWbg7dcvqFQ4Kc) [![asciicast](https://asciinema.org/a/nOhuc7LvI6bRWbg7dcvqFQ4Kc.png)](https://asciinema.org/a/nOhuc7LvI6bRWbg7dcvqFQ4Kc)
### deploy with docker-compose manual ### deploy with docker-compose manual
1. Change targets ip (192.168.88.1) into file prometheus/prometheus.yml 1.Change targets ip (192.168.88.1) into file prometheus/prometheus.yml
2. Run 2.Run
```console ```console
docker-compose up -d docker-compose up -d
``` ```
3. Open [localhost:3000](http://localhost:3000)
3.Open [localhost:3000](http://localhost:3000)
Grafana login: admin, password: mikrotik Grafana login: admin, password: mikrotik
If you want to change the credentials, then edit the ".env" file If you want to change the credentials, then edit the ".env" file
----------- -----------
## Manual deploy ## Manual deploy
1.add into prometheus.yml 1.add into prometheus.yml