Code Monkey home page Code Monkey logo

cosmozab's Introduction

cosmozab

Zabbix stuff for Cosmos Nodes

WARNiNG: This is still very much in development and i have not yet created most of the documentation to get up and running. Assuming you are proficient in Zabbix somewhat, you should be able to get these working. You will need to add macros etc for some of the functionality. Just ask if there is any questions.

I have developed using Zabbix 6.0 server/gui and zabbix-agen2. But should work on any version above 5 i think.

Requires:

  • API and RPC exposed for localhost. Calls will be made to these services from zabbix-agent2. Refer to the zab.userparameters.cosmos.conf file for info on what calls are made to the API and RPC.

Introduction

This is a collection of instructions, configurations and templates to integrate Zabbix monitoring with standard Cosmos Nodes running.

Configurations are based on Ubuntu 20.04 but should work on most Linux distributions.

Screenshots

image

Install Agent and Configs

We will be using Zabbix version 5.4 repository.

Install repository and zabbix-agent2

Add repository and update apt:

wget https://repo.zabbix.com/zabbix/5.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_5.4-1+ubuntu20.04_all.deb
sudo dpkg -i zabbix-release_5.4-1+ubuntu20.04_all.deb && sudo apt update
rm -rf zabbix-release_5.4-1+ubuntu20.04_all.deb

Install zabbix-agent2 with apt:

sudo apt install zabbix-agent2 -y

Note: if you're running Ubuntu 22.04+, you'll also need to install libssl1.1:

echo "deb http://security.ubuntu.com/ubuntu impish-security main" | sudo tee /etc/apt/sources.list.d/impish-security.list
sudo apt update
sudo apt install libssl1.1 zabbix-agent2 -y

Configure zabbix-agent2

Edit the zabbix-agen2.conf

Set a variable with your server address:

SERVER=<your-server-address>

Inject server address into config with sed

sudo sed -i 's/Server=127.0.0.1/Server='"${SERVER}"'/g' /etc/zabbix/zabbix_agent2.conf

Install Configs

curl config file from repo

sudo curl -o /etc/zabbix/zabbix_agent2.d/zab.userparameters.cosmos.conf https://raw.githubusercontent.com/gh0stdotexe/cosmozab/main/zabbix_agent2.d/zab.userparameters.cosmos.conf

Update UFW for Zabbix port

sudo ufw allow from $SERVER to any port 10050

Enable and restart agent

sudo systemctl daemon-reload && sudo systemctl enable zabbix-agent2
sudo systemctl restart zabbix-agent2
journalctl -u zabbix-agent2 -f

Clean Up Existing Monitoring (Prometheus, Node Exporter)

Disable old services:

sudo systemctl disable node_exporter
sudo systemctl disable prometheus

Close prometheus ports:

sudo ufw status numbered

# delete both 9093 ports from list (example #'s below)

sudo ufw delete #4
sudo ufw delete #9

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.