-
Notifications
You must be signed in to change notification settings - Fork 56
Building Statsd
The instructions provided below specify the steps to build Statsd version 0.10.2 on Linux on IBM Z for the following distributions:
- RHEL (8.8, 8.10, 9.2, 9.4, 9.5)
- SLES (15 SP6)
- Ubuntu (20.04, 22.04, 24.04, 24.10)
General Notes:
-
When following the steps below please use a standard permission user unless otherwise specified
-
A directory
/<source_root>/
will be referred to in these instructions, this is a temporary writable directory anywhere you'd like to place it
If you want to build Statsd using manual steps, go to STEP 2.
Use the following commands to build Statsd using the build script. Please make sure you have wget installed.
wget -q https://raw.githubusercontent.com/linux-on-ibm-z/scripts/master/Statsd/0.10.2/build_statsd.sh
# Build Statsd
bash build_statsd.sh [Provide -t option for executing build with tests]
If the build completes successfully, go to STEP 5. In case of error, check logs
for more details or go to STEP 2 to follow manual build steps.
export SOURCE_ROOT=/<source_root>/
-
RHEL (8.8, 8.10, 9.2, 9.4, 9.5)
sudo yum install -y git wget tar unzip hostname make gcc-c++ xz gzip python3 nmap procps
-
SLES (15 SP6)
sudo zypper install -y git wget tar unzip hostname make gcc-c++ xz gzip python3 nmap procps
-
Ubuntu (20.04, 22.04, 24.04, 24.10)
sudo apt-get update sudo apt-get install -y git wget tar unzip hostname python3 g++ make xz-utils
-
Install Nodejs
cd $SOURCE_ROOT NODE_VERSION=v18.17.1 wget https://nodejs.org/dist/${NODE_VERSION}/node-${NODE_VERSION}-linux-s390x.tar.xz chmod ugo+r node-${NODE_VERSION}-linux-s390x.tar.xz sudo tar -C /usr/local -xf node-${NODE_VERSION}-linux-s390x.tar.xz export PATH=$PATH:/usr/local/node-${NODE_VERSION}-linux-s390x/bin node -v
-
Download Statsd source code
cd $SOURCE_ROOT git clone https://github.com/etsy/statsd.git cd statsd git checkout v0.10.2
-
Install required npm dependencies
npm install
Note: User can run npm audit fix
command to automatically install compatible updates to vulnerable dependencies.
- Run test cases
cd $SOURCE_ROOT/statsd/ ./run_tests.js
cd $SOURCE_ROOT/statsd
node stats.js /path/to/config
Make sure that you have netcat installed before executing the below command
The basic line protocol expects metrics to be sent in the format:
<metricname>:<value>|<type>
e.g. echo "foo:1|c" | nc -u -w2 127.0.0.1 8125
The information provided in this article is accurate at the time of writing, but on-going development in the open-source projects involved may make the information incorrect or obsolete. Please open issue or contact us on IBM Z Community if you have any questions or feedback.