Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix import for Grafana v6.7.3 #8 #1

Merged
merged 4 commits into from
Apr 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,75 @@ This graph shows the fping\_rtt summary as "SmokePing"-like graph in Grafana:
replacement: 127.0.0.1:9605 # The fping-exporter's real hostname:port.
```

## Installation for CentOS 8
1. Install Go on RHEL 8 using and set PATH :
```
[root@prometheus ~]# sudo yum module -y install go-toolset
[root@prometheus ~]# vi ~/.bash_profile
[root@prometheus ~]# export PATH=$PATH:/usr/bin/go
[root@prometheus ~]# source ~/.bash_profile
```
2. Install fping on RHEL 8 using :
```
[root@prometheus ~]# yum install -y fping
```
3. Download and compile fping-exporter on RHEL 8 using :
```
[root@prometheus ~]# git clone https://github.com/schweikert/fping-exporter.git /tmp/fping-exporter
[root@prometheus ~]# go build -o /tmp/fping-exporter
[root@prometheus ~]# cp fping-exporter /usr/local/bin
```
4. Next, adjust the firewall as follows to allow external connections to the server via port 9605
```
[root@prometheus ~]# firewall-cmd --add-port=9605/tcp --permanent
[root@prometheus ~]# firewall-cmd --reload
```
5. Creating a Systemd service file for fping-exporter (For us to manage fping-exporter as a service using systemd, we need to create a system file for it. So, create the file as shown and paste the content,)
```
[root@prometheus ~]# vi /etc/systemd/system/fping-exporter.service
```

```
[Unit]
Description=fping-exporter allows you to run measure network latency using fping and prometheus
Wants=network-online.target
After=network-online.target

[Service]
User=root
Group=root
Type=simple
CapabilityBoundingSet=CAP_NET_RAW
AmbientCapabilities=CAP_NET_RAW

# Application Options:
# -l, --listen=[HOST]:PORT Listen address (default: :9605)
# -p, --period=SECS Period in seconds, should match Prometheus scrape interval (default: 60)
# -f, --fping=PATH Fping binary path (default: /usr/bin/fping)
# -c, --count=N Number of pings to send at each period (default: 20)

ExecStart=/usr/local/bin/fping-exporter \
-f /usr/sbin/fping \
-p 300 \
-c 5

[Install]
WantedBy=multi-user.target
```
6. For the changes to take effect, reload the systemctl :
```
[root@prometheus ~]# systemctl daemon-reload
```
7. Now start and enable fping-exporter to run on boot
```
[root@prometheus ~]# systemctl start fping-exporter
[root@prometheus ~]# systemctl enable fping-exporter
```
8. Just to be certain that fping-exporter is running, run the command:
```
[root@prometheus ~]# systemctl status fping-exporter
```

## Metrics

fping-exporter produces the following metrics:
Expand Down
Binary file modified README_screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading