Senin, 12 Juni 2023

CACTI-docker OK

 

Run Cacti 1.2.20 @ Weathermap on Docker

https://forums.cacti.net/viewtopic.php?t=61839

https://forums.cacti.net/viewtopic.php?t=61839

https://hub.docker.com/r/admindean/cacti

Runtime environment:

CentOS 7.9, MariaDB 10.1.48, PHP 7.3.30
Cacti v1.2.20
Thold 1.5.3
Monitor 2.5
Weathermap 0.98a - Updated

How to use:

Pull image:
docker pull admindean/cacti:latest

Create backup directory:
mkdir -p /usr/share/cacti/rra && chmod 777 -R /usr/share/cacti/rra
mkdir -p /usr/share/cacti/weathermap && chmod 777 -R /usr/share/cacti/weathermap
mkdir -p /usr/share/cacti/mysql_backup && chmod 777 -R /usr/share/cacti/mysql_backup

Run docker instance:
docker run -d --restart=always --name cacti --hostname cacti -p 8080:80 --privileged=true -v /usr/share/cacti/rra:/usr/share/cacti/rra -v /usr/share/cacti/weathermap:/usr/share/cacti/weathermap -v /usr/share/cacti/mysql_backup:/usr/share/cacti/mysql_backup admindean/cacti:latest

Login docker:
docker exec -it cacti /bin/bash

Upgrade:
yum update -y

Web Access:
http://your_ip:8080/cacti
username: admin
password: admin

MariaDB Password:
root / root
cactiuser / cactiuser

Cronjob:
@daily /usr/bin/find /usr/share/cacti/mysql_backup/ -ctime +30 -exec rm {} ;
@daily /usr/bin/find /usr/share/cacti/weathermap/ -ctime +30 -exec rm {} ;
@daily /usr/bin/mysqldump -uroot -proot cacti > /usr/share/cacti/mysql_backup/mysql_backup_$(date +"%Y-%m-%d").sql
@daily /usr/bin/cp /usr/share/cacti/plugins/weathermap /usr/share/cacti/weathermap/weathermap_backup_$(date +"%Y-%m-%d") -R

===============================================
root@ubuntu:~/cacti/docker-cacti-master# mkdir -p /usr/share/cacti/rra && chmod 777 -R /usr/share/cacti/rra
root@ubuntu:~/cacti/docker-cacti-master# mkdir -p /usr/share/cacti/weathermap && chmod 777 -R /usr/share/cacti/weathermap
root@ubuntu:~/cacti/docker-cacti-master# mkdir -p /usr/share/cacti/mysql_backup && chmod 777 -R /usr/share/cacti/mysql_backup
root@ubuntu:~/cacti/docker-cacti-master# docker run -d --restart=always --name cacti --hostname cacti -p 8080:80 --privileged=true -v /usr/share/cacti/rra:/usr/share/cacti/rra -v /usr/share/cacti/weathe
rmap:/usr/share/cacti/weathermap -v /usr/share/cacti/mysql_backup:/usr/share/cacti/mysql_backup admindean/cacti:latest
Unable to find image 'admindean/cacti:latest' locally
latest: Pulling from admindean/cacti
2d473b07cdd5: Pull complete  
7ece81d1d1c2: Pull complete  
3127ea2f8b32: Pull complete  
cbd2319e636b: Pull complete  
2f0268fd283e: Pull complete  
b77090076045: Pull complete  
9ddfb725914d: Pull complete  
996d50300543: Pull complete  
Digest: sha256:4bea2cacc88a99073b43d7b75a6425ee2a410c931d29e2fb764a9ba6f241cb2e
Status: Downloaded newer image for admindean/cacti:latest
2cea241434a2aec2d76e1229a48b6d522eb1ab1145fd665bd66da48177016cab
root@ubuntu:~/cacti/docker-cacti-master# docker ps
CONTAINER ID        IMAGE                     COMMAND                  CREATED             STATUS              PORTS                                                       NAMES
2cea241434a2        admindean/cacti:latest    "/usr/sbin/init"         2 minutes ago       Up 2 minutes        0.0.0.0:8080->80/tcp                                        cacti
699665ddd10f        adminer                   "entrypoint.sh php -…"   3 months ago        Up 3 months         0.0.0.0:8082->8080/tcp                                      adminer_adminer_1
58a8b765610e        odoo:16                   "/entrypoint.sh --"      3 months ago        Up 3 months         0.0.0.0:8069->8069/tcp, 8071/tcp, 0.0.0.0:20016->8072/tcp   odoo16dockercomposemaster_odoo1
6_1
f4100eacf033        postgres:15               "docker-entrypoint.s…"   3 months ago        Up 3 months         0.0.0.0:5432->5432/tcp                                      odoo16dockercomposemaster_db_1
ac46b9bbc2c7        juglans/finereport        "catalina.sh run"        18 months ago       Up 6 months         0.0.0.0:9011->8080/tcp                                      finereport_finereport_1
18d021c675f4        postgres:9.5              "docker-entrypoint.s…"   3 years ago         Up 6 months         5432/tcp                                                    hrm-postgres
e5831a7add62        webdevops/apache:latest   "/entrypoint supervi…"   3 years ago         Up 6 months         443/tcp, 0.0.0.0:8765->80/tcp                               web-revenu
d3c61e93af54        root_php                  "/docker-entrypoint.…"   3 years ago         Up 6 months                                                                     php-revenu
root@ubuntu:~/cacti/docker-cacti-master#

Tidak ada komentar:

Posting Komentar