PerfSONAR Central Archive Setup and Configuration
Introduction
This document provides instructions on how to setup a central PerfSONAR archive server to orchestrate and collect test results from multiple perfSONAR nodes. This document is primarily
intended for network administrators or more advanced users with several perfSONAR nodes who wish to monitor these nodes.
Requirements:
A Rocky 9 server for the central archive
A set of servers (any OS that can run perfSONAR) acting as measurement nodes
Super-user access on all these systems
Software Install
Start by configuring dnf. Run the following commands.
dnf install epel-release dnf config-manager --set-enabled crb dnf install http://software.internet2.edu/rpms/el9/x86_64/latest/packages/perfsonar-repo-0.11-1.noarch.rpm dnf clean all
Disable Security-Enhanced Linux features (SELinux), as it may interfere with installing perfSONAR packages.
sudo setenforce 0 sed -i -e 's/^SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
Install the following perfSONAR packages.
psconfig-publisher
: psConfig tools to publish files that configure test topologies.psconfig-hostmetrics
: custom Prometheus setup to collect host information.archive
: custom Logstash/OpenSearch setup for storing perfSONAR data.grafana
andgrafana-toolkit
: custom Grafana setup for displaying perfSONAR data.dnf -y install perfsonar-archive perfsonar-grafana perfsonar-grafana-toolkit perfsonar-psconfig-hostmetrics perfsonar-psconfig-publisher
Post-Install Configuration
Configure the firewall and open ports 80 and 443
firewall-cmd --permanent --add-port=80/tcp firewall-cmd --permanent --add-port=443/tcp firewall-cmd --reload
You should now be able to go to "https://<IP or host address>/grafana" to access the home page on the Grafana web UI. This page will look similar to below once nodes are running tests and returning data.
Configuring the Dashboard
When first created, their is no specific dashboard setup. You will need to create a configuration file that details the tests you want to perform and on which perfSONAR nodes you want to run them.
psConfig file
Create a configuration file.
There are templates of these kinds of files in /usr/share/doc/perfsonar/psconfig/
To use the template below; edit the following fields
Under the "archives" section, replace FILL_IN_ARCHIVE_HOSTNAME_OR_IP with the server's hostname/IP address
Under the "addresses" section, replace the items FILL_IN_HOSTNAME_OR_IP_X with the hostname/IP address of one of the perfSONAR nodes you wish to include in your grid.
Under the "addresses" section, similarly replace the items FILL_IN_ADDRESS_NAME_X with a name for the perfSONAR nodes. They do NOT need to match the hostname/IP.
To add more nodes, add another "FILL_IN_ADDRESS_NAME_X": { "address": "FILL_IN_HOSTNAME_OR_IP_X" } entry.
Use the following command to verify the validity
psconfig validate psconfig-grid.json
psconfig-grid.json
{ "_meta":{ "display-name": "Example Measurements" }, "archives": { "example_esmond_archive": { "archiver": "http", "data": { "schema": 3, "_url": "https://FILL_IN_ESMOND_HOSTNAME_OR_IP/logstash", "verify-ssl": false, "op": "put", "_headers": { "x-ps-observer": "{% scheduled_by_address %}", "content-type": "aaplication/json" } }, "_meta": { "esmond_url": "https://FILL_IN_ESMOND_HOSTNAME_OR_IP/esmond/perfsonar/archive/" } } }, "addresses": { "FILL_IN_ADDRESS_NAME_1": { "address": "FILL_IN_HOSTNAME_OR_IP_1" }, "FILL_IN_ADDRESS_NAME_2": { "address": "FILL_IN_HOSTNAME_OR_IP_2" }, ... }, "groups": { "example_group_mesh": { "type": "mesh", "addresses": [ { "name": "FILL_IN_ADDRESS_NAME_1" }, { "name": "FILL_IN_ADDRESS_NAME_2" }, ... ] } }, "tests": { "example_test_throughput": { "type": "throughput", "spec": { "source": "{% address[0] %}", "dest": "{% address[1] %}", "duration": "PT30S" } }, "example_test_latencybg": { "type": "latencybg", "spec": { "source": "{% address[0] %}", "dest": "{% address[1] %}", "flip": "{% flip %}" } }, "example_test_trace": { "type": "trace", "spec": { "source": "{% address[0] %}", "dest": "{% address[1] %}" } } }, "schedules": { "example_schedule_PT4H": { "repeat": "PT4H", "sliprand": true, "slip": "PT4H" }, "example_schedule_PT10M": { "repeat": "PT10M", "sliprand": true, "slip": "PT10M" } }, "tasks": { "example_task_throughput": { "group": "example_group_mesh", "test": "example_test_throughput", "schedule": "example_schedule_PT4H", "archives": [ "example_esmond_archive" ], "_meta": { "display-name": "Example Throughput Tests" } }, "example_task_latencybg": { "group": "example_group_mesh", "test": "example_test_latencybg", "archives": [ "example_esmond_archive" ], "_meta": { "display-name": "Example Loss Tests" } }, "example_task_trace": { "group": "example_group_mesh", "test": "example_test_trace", "schedule": "example_schedule_PT10M", "archives": [ "example_esmond_archive" ], "_meta": { "display-name": "Example Traceroute Tests" } } } }
Once you have the config file, run the following command to publish the config file.
psconfig publish /PATH/TO/psconfig-grid.json
Open
/etc/httpd/conf.d/apache-logstash.conf
and add the IPs in thepsconfig-grid.json
in theRequireAny
Section to allow those nodes to send data to this archive, following the examples in the comment.IfModule proxy_module> ProxyRequests Off <Proxy *> <IfVersion >= 2.4> Require all granted </IfVersion> <IfVersion < 2.4> Order deny,allow Allow from all </IfVersion> </Proxy> ProxyPass /logstash http://localhost:11283 status=+I ProxyPassReverse /logstash http://localhost:11283 status=+I ProxyPreserveHost On <Location /logstash> Authtype Basic Authname "Logstash Pass" AuthUserFile /etc/perfsonar/opensearch/logstash_login <RequireAny> ################## ## Require a valid username and password Require valid-user ################### ## Enable IP based or hostname authentication as an alternative to username/pass ## The RequireAny means that as long as one of these match then writing will be allowed ## There are are many options, some of which are shown below but for full docs see ## https://httpd.apache.org/docs/2.4/howto/access.html ## ## Examples: ## ## Allow access from IPs 10.1.1.1 and 10.1.1.2 ## or 2001:db8::a00:20ff:fea7:ccea ## # Require ip 10.1.1.1 10.1.1.2 # Require ip 2001:db8::a00:20ff:fea7:ccea ## ## Allow access from subnet 10.1.1.0/24 ## or subnet 2001:db8:2:1::/64 ## # Require ip 10.1.1.0/24 # Require ip 2001:db8:2:1::/64 ## ## Allow access from a host named example.perfsonar.net # Require host example.perfsonar.net ## ## Allow access from any host with a name ending in .edu or .gov ## # Require host gov edu </RequireAny> </Location> </IfModule>
Restart the web server to make changes the previous changes apply.
systemctl restart httpd
Run the following command to add the configuration to the archive server’s own services to generate a Grafana dashboard.
psconfig remote add https://<archive name>/psconfig/psconfig-grid.json
After running this, there will be the dashboard and an “All PerfSONAR Measurements“ dashboard on the bottom-right side of the home page, under “pSConfig Dashboards“. There will still be no data.
perfSONAR Measurement Node Configuration
If not already setup, follow PerfSONAR Install Guide Using Package Manager on setting up a measurement node with PerfSONAR toolkit.
For each measurement node to begin running and sending tests, each one needs to have the previous psconfig
command ran on their local system, then afterwards restart the pScheduler service (to make the test scheduling start immediately).
psconfig remote add https://<archive name>/psconfig/psconfig-grid.json
systemctl restart psconfig-pscheduler-agent
After running these commands, you should be able to go to either dashboard and begin to see some data after about 10 minutes (if using the same schedule in the example).
Related content
Center for Computational Sciences