-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split ci/metrics to ceilometer and collectd
- Loading branch information
Showing
12 changed files
with
48 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,14 +81,14 @@ jobs: | |
run: | | ||
sudo apt-get install collectd | ||
sudo systemctl stop collectd && sudo systemctl disable collectd | ||
sudo cp ci/integration/metrics/collectd.conf /etc/collectd/collectd.conf | ||
sudo cp ci/integration/metrics/collectd/collectd.conf /etc/collectd/collectd.conf | ||
sudo touch /var/log/collectd.log && sudo chmod a+rw /var/log/collectd.log | ||
sudo collectd -C ci/integration/metrics/collectd.conf | ||
sudo collectd -C ci/integration/metrics/collectd/collectd.conf | ||
- name: Run sg-core to process metrics | ||
run: | | ||
docker run --name=sgcore -d -uroot --network host $BRIDGE_VOLUME -e OPSTOOLS_REPO \ | ||
--volume ${{ github.workspace }}:$PROJECT_ROOT:z --workdir $PROJECT_ROOT \ | ||
$TEST_IMAGE bash $PROJECT_ROOT/ci/integration/metrics/run_sg_collectd_bridge.sh | ||
$TEST_IMAGE bash $PROJECT_ROOT/ci/integration/metrics/collectd/run_sg.sh | ||
- name: Run Prometheus to store metrics | ||
run: | | ||
docker run --name=prometheus -d --network host \ | ||
|
@@ -102,15 +102,13 @@ jobs: | |
docker logs qdr | ||
echo "========================= sg-core =======================" && \ | ||
docker logs sgcore | ||
echo "========================= ceilometer ====================" && \ | ||
sudo journalctl -xu [email protected] | ||
echo "======================== prometheus =====================" && \ | ||
docker logs prometheus | ||
- name: Validate metrics processing | ||
run: | | ||
docker run --name=validate -uroot --network host \ | ||
--volume ${{ github.workspace }}:$PROJECT_ROOT:z --workdir $PROJECT_ROOT \ | ||
$TEST_IMAGE bash $PROJECT_ROOT/ci/integration/metrics/run_validation.sh | ||
$TEST_IMAGE bash $PROJECT_ROOT/ci/integration/metrics/collectd/run_validation.sh | ||
#------------------------------------------------------------------------------- | ||
ceilometer-metrics-bridge: | ||
name: "[metrics] transport: socket(sg-bridge); handler: ceilometer-metrics; application: prometheus" | ||
|
@@ -180,15 +178,15 @@ jobs: | |
echo pseudo_vhost=true | crudini --merge /etc/ceilometer/ceilometer.conf oslo_messaging_amqp | ||
echo rpc_address_prefix="" | crudini --merge /etc/ceilometer/ceilometer.conf oslo_messaging_amqp | ||
echo notify_address_prefix="" | crudini --merge /etc/ceilometer/ceilometer.conf oslo_messaging_amqp | ||
cp ci/integration/metrics/*pipeline.yaml /etc/ceilometer/. | ||
cp ci/integration/metrics/ceilometer/*pipeline.yaml /etc/ceilometer/. | ||
cat /etc/ceilometer/* | ||
sudo pip install pyngus | ||
sudo systemctl restart [email protected] | ||
- name: Run sg-core to process metrics | ||
run: | | ||
docker run --name=sgcore -d -uroot --network host $BRIDGE_VOLUME -e OPSTOOLS_REPO \ | ||
--volume ${{ github.workspace }}:$PROJECT_ROOT:z --workdir $PROJECT_ROOT \ | ||
$TEST_IMAGE bash $PROJECT_ROOT/ci/integration/metrics/run_sg_ceilometer_bridge.sh | ||
$TEST_IMAGE bash $PROJECT_ROOT/ci/integration/metrics/ceilometer/run_sg_with_bridge.sh | ||
- name: Run Prometheus to store metrics | ||
run: | | ||
docker run --name=prometheus -d --network host \ | ||
|
@@ -210,7 +208,7 @@ jobs: | |
run: | | ||
docker run --name=validate -uroot --network host \ | ||
--volume ${{ github.workspace }}:$PROJECT_ROOT:z --workdir $PROJECT_ROOT \ | ||
$TEST_IMAGE bash $PROJECT_ROOT/ci/integration/metrics/run_validation.sh | ||
$TEST_IMAGE bash $PROJECT_ROOT/ci/integration/metrics/ceilometer/run_validation.sh | ||
#------------------------------------------------------------------------------- | ||
logging: | ||
name: "[logging] handler: logs; application: elasticsearch, loki" | ||
|
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/env bash | ||
# CI script for UBI8 job | ||
# purpose: spawn sg-core to process messages sent by rsyslog | ||
|
||
set -ex | ||
|
||
# enable required repo(s) | ||
curl -o /etc/yum.repos.d/CentOS-OpsTools.repo $OPSTOOLS_REPO | ||
sed -i 's/gpgcheck=1/gpgcheck=0/g' /etc/yum.repos.d/CentOS-OpsTools.repo | ||
|
||
dnf install -y git golang gcc make qpid-proton-c-devel | ||
|
||
export GOBIN=$GOPATH/bin | ||
export PATH=$PATH:$GOBIN | ||
|
||
go install golang.org/dl/go1.19@latest | ||
go1.19 download | ||
|
||
# install sg-core and start sg-core | ||
mkdir -p /usr/lib64/sg-core | ||
PLUGIN_DIR=/usr/lib64/sg-core/ GOCMD=go1.19 BUILD_ARGS=-buildvcs=false ./build.sh | ||
|
||
./sg-core -config ./ci/integration/metrics/sg_config_tcp.yaml |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
|
||
pluginDir: /usr/lib64/sg-core | ||
logLevel: debug | ||
|
||
transports: | ||
- name: socket | ||
config: | ||
type: tcp | ||
handlers: | ||
- name: ceilometer-metrics | ||
|
||
applications: | ||
- name: prometheus | ||
config: | ||
host: 0.0.0.0 | ||
port: 3000 |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.