[TUTORIAL] Aggregate Tracking Center logs of multiple nodes into one

bco_

New Member
Nov 7, 2022
7
1
3
Hello community :)

Multiple solutions have been already shared here to aggregate tracking center of all nodes.

Today, i'd like to share with you a new way to do it using pussh from bearstech.

TL;DR :
Code:
apt-get -o DPkg::options::=--force-confmiss --reinstall install pmg-log-tracker -y

cp /usr/bin/pmg-log-tracker /usr/bin/pmg-log-tracker.node

apt-get install git -y

rm -fr /opt/pussh

git clone https://github.com/bearstech/pussh.git /opt/pussh

cat <<'EOF' >/opt/pussh/cluster-pmg
127.0.0.1
125.545.544
EOF

cat <<'EOF' >/usr/bin/pmg-log-tracker
/opt/pussh/pussh -f /opt/pussh/cluster-pmg /usr/bin/pmg-log-tracker.node $@ 2>/dev/null | sed 's/127.0.0.1: //g;s/125.545.544: //g'
EOF

Detailed steps :
Always install latest pmg-log-tracker binary :
Code:
apt-get -o DPkg::options::=--force-confmiss --reinstall install pmg-log-tracker -y

Rename binary to .node :
Code:
cp /usr/bin/pmg-log-tracker /usr/bin/pmg-log-tracker.node

Install Git
Code:
apt-get install git -y

Clear /opt/pussh locations ( Optionnal ) :
Code:
rm -fr /opt/pussh

Clone pussh repo :
Code:
git clone https://github.com/bearstech/pussh.git /opt/pussh

Add your pmg cluster nodes into a file, where 125.545.544 is the IP of nodes. One node per line.
Code:
cat <<'EOF' >/opt/pussh/cluster-pmg
127.0.0.1
125.545.544
EOF

Create a new pmg-log-tracker file, which calls pmg-log-tracker.node of all nodes mentionned into pmg cluster nodes file, remove stderr and use sed to clear IP from response
Code:
cat <<'EOF' >/usr/bin/pmg-log-tracker
/opt/pussh/pussh -f /opt/pussh/cluster-pmg /usr/bin/pmg-log-tracker.node $@ 2>/dev/null | sed 's/127.0.0.1: //g;s/125.545.544: //g'
EOF

Results :
1699371518207.png
 
Last edited:
  • Like
Reactions: LeFred

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!