Skip to content

Commit ac4b08e

Browse files
committed
Install helper added and updated the documentation
Signed-off-by: Aravinda Vishwanathapura <[email protected]>
1 parent 5f22923 commit ac4b08e

File tree

4 files changed

+56
-8
lines changed

4 files changed

+56
-8
lines changed

.github/workflows/on-release-tag.yaml

+20
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,23 @@ jobs:
5454
tag: ${{ github.ref }}
5555
overwrite: true
5656
file_glob: true
57+
upload_release_files:
58+
runs-on: ubuntu-latest
59+
steps:
60+
- uses: actions/checkout@v1
61+
- name: Upload gluster-metrics-exporter.service to the release
62+
uses: svenstaro/upload-release-action@v2
63+
with:
64+
repo_token: ${{ secrets.GITHUB_TOKEN }}
65+
file: extra/*.service
66+
tag: ${{ github.ref }}
67+
overwrite: true
68+
file_glob: true
69+
- name: Upload install.sh script to the release
70+
uses: svenstaro/upload-release-action@v2
71+
with:
72+
repo_token: ${{ secrets.GITHUB_TOKEN }}
73+
file: extra/install.sh
74+
tag: ${{ github.ref }}
75+
overwrite: true
76+
file_glob: true

README.md

+29-8
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,49 @@
55
Download the latest release with the command
66

77
```
8-
curl -L https://github.com/kadalu/gluster-metrics-exporter/releases/latest/download/gluster-metrics-exporter-`uname -m | sed 's|aarch64|arm64|' | sed 's|x86_64|amd64|'` -o gluster-metrics-exporter
8+
$ curl -fsSL https://github.com/kadalu/gluster-metrics-exporter/releases/latest/download/install.sh | sudo bash -x
99
```
1010

11-
Make the `gluster-metrics-exporter` binary executable.
11+
Test to ensure the version you installed is up-to-date
1212

1313
```
14-
chmod +x ./gluster-metrics-exporter
14+
$ gluster-metrics-exporter --version
1515
```
1616

17-
Move the binary in to your PATH.
17+
## Usage:
18+
19+
Start the Gluster Metrics exporter service in all the Storage nodes
1820

1921
```
20-
sudo mv ./gluster-metrics-exporter /usr/local/bin/gluster-metrics-exporter
22+
# systemctl enable gluster-metrics-exporter
23+
# systemctl start gluster-metrics-exporter
2124
```
2225

23-
Test to ensure the version you installed is up-to-date
26+
Above command picks up the Gluster hostname by running the `hostname` command. If the local Gluster hostname is different than create a hostname file in `/var/lib/glusterd`.
2427

2528
```
26-
$ gluster-metrics-exporter --version
29+
# echo "server1.example.com" > /var/lib/glusterd/hostname
2730
```
2831

29-
## Usage:
32+
To fetch the Prometheus compatible Metrics, call the API from any one Storage node.
33+
34+
```
35+
$ curl http://server1.example.com:9713/metrics
36+
```
37+
38+
To get the same metrics in JSON format
39+
40+
```
41+
$ curl http://server1.example.com:9713/metrics.json
42+
```
43+
44+
## Manually run the exporter (Without systemd)
45+
46+
```
47+
# gluster-metrics-exporter
48+
```
49+
50+
Available options
3051

3152
```
3253
Usage: gluster-metrics-exporter [OPTIONS]
File renamed without changes.

extra/install.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
curl -fsSL https://github.com/kadalu/gluster-metrics-exporter/releases/latest/download/gluster-metrics-exporter-`uname -m | sed 's|aarch64|arm64|' | sed 's|x86_64|amd64|'` -o /tmp/gluster-metrics-exporter
4+
curl -fsSL https://github.com/kadalu/gluster-metrics-exporter/releases/latest/download/gluster-metrics-exporter.service -o /tmp/gluster-metrics-exporter.service
5+
6+
install -m 700 /tmp/gluster-metrics-exporter.service /lib/systemd/system/
7+
install /tmp/gluster-metrics-exporter /usr/sbin/gluster-metrics-exporter

0 commit comments

Comments
 (0)