Skip to content
This repository was archived by the owner on Mar 22, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
e297724
Adding clean interface to start rabbitmq uploader
djw8605 Dec 18, 2018
8ddb225
Stub out a new scheduler for the perfSonar collector.
bbockelm Dec 18, 2018
7a34038
Update requirements and gitignore for new scheduler code.
bbockelm Dec 18, 2018
3250f6b
Merge branch 'new_scheduler' of https://github.com/bbockelm/rsv-perfs…
djw8605 Dec 18, 2018
511ec43
Adding shared RabbitMQ connection
djw8605 Dec 18, 2018
54376c1
Add support for querying pS in the child processes.
bbockelm Dec 18, 2018
19cca9d
Merge branch 'new_scheduler' of https://github.com/bbockelm/rsv-perfs…
djw8605 Dec 18, 2018
a6d6acd
Add the ability to easily debug the scheduler.
bbockelm Dec 18, 2018
110080e
Adding shared rabbitmq
djw8605 Dec 18, 2018
8908b1e
Merge branch 'new_scheduler' of https://github.com/bbockelm/rsv-perfs…
djw8605 Dec 18, 2018
2a6ec69
Fixing merge
djw8605 Dec 18, 2018
94fbad2
Remove files and modules not needed for ps-collector approach.
bbockelm Dec 18, 2018
62a4568
Updating shared rabbitmq
djw8605 Dec 18, 2018
60d704f
Merge branch 'new_scheduler' of https://github.com/bbockelm/rsv-perfs…
djw8605 Dec 18, 2018
b4d3511
Adding dependencies
djw8605 Dec 18, 2018
ff74a1e
Add ability to read files in a directory.
bbockelm Dec 18, 2018
b3e0e70
Add support for Python logging.
bbockelm Dec 18, 2018
125f6db
Add default sample config.ini
bbockelm Dec 18, 2018
659325f
Updating shared rabbitmq
djw8605 Dec 18, 2018
238d03e
Merge branch 'new_scheduler' of https://github.com/bbockelm/rsv-perfs…
djw8605 Dec 18, 2018
2e5054e
Note default location of logging configuration.
bbockelm Dec 18, 2018
fed38df
Fixed shared rabbitmq
djw8605 Dec 18, 2018
529c88f
Begin packaging of the daemon.
bbockelm Dec 18, 2018
b6c17bd
Merge branch 'new_scheduler' of github.com:bbockelm/rsv-perfsonar int…
bbockelm Dec 18, 2018
4401aa3
Add missing configuration files.
bbockelm Dec 18, 2018
ce5f583
Fix configuration location.
bbockelm Dec 18, 2018
5169465
Fix RPM specification for the package.
bbockelm Dec 18, 2018
e87c86c
Fixing some uploader
djw8605 Dec 18, 2018
03058a1
Merge branch 'new_scheduler' of https://github.com/bbockelm/rsv-perfs…
djw8605 Dec 18, 2018
b1a648c
Adding atomic write
djw8605 Dec 18, 2018
9b2729b
Adding logging
djw8605 Dec 18, 2018
2587f62
Adding mesh download
djw8605 Dec 19, 2018
0b13c00
Removing some of the SOCKs stuff that complicates everything
djw8605 Dec 20, 2018
d5c567b
Fixing install dependencies
djw8605 Dec 20, 2018
facb528
Adding docker file
djw8605 Dec 20, 2018
6b8386c
Fix configs
djw8605 Jan 22, 2019
7ea1d34
Fixing typo for remove from set
djw8605 Jan 25, 2019
6f6c5cf
Install ca certificates
djw8605 Jan 25, 2019
ccbc891
Small fixes from tests
djw8605 Feb 5, 2019
5747097
Read mesh URL's from the read_url
djw8605 Mar 8, 2019
ba6d875
Adding SSL back in
djw8605 Mar 8, 2019
8b69466
Adding process number to the log message
djw8605 Mar 8, 2019
07e6127
Set pool_size in config to 200
djw8605 Mar 8, 2019
07b4885
Adding prometheus monitoring
djw8605 Mar 11, 2019
bd56820
Removing print statements
djw8605 Mar 11, 2019
b107810
Fixing running probes metric
djw8605 Mar 11, 2019
1b13c4c
Removing summary collection
djw8605 Mar 11, 2019
a1fe9bc
Fixing misspelling
djw8605 Mar 11, 2019
3b87a4a
Adding docker-compose file
djw8605 Mar 11, 2019
bd569ac
Removing unused files
djw8605 Mar 11, 2019
b969c24
Renaming to README.md and update
djw8605 Mar 12, 2019
cfc995b
Updating README
djw8605 Mar 12, 2019
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/ps_collector/*.pyc
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@


FROM python:2-alpine3.7

RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/*

ADD . /ps_collector
WORKDIR /ps_collector
RUN pip install -r requirements.txt

RUN python setup.py install

EXPOSE 8000

CMD ps-collector
41 changes: 0 additions & 41 deletions Makefile

This file was deleted.

6 changes: 0 additions & 6 deletions README

This file was deleted.

30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

PS Collector
============

The PS Collector queries [perfSONAR](https://www.perfsonar.net/) instances and sends the data onto a RabbitMQ message bus.

The collector is packages in a docker conatiner available at:


## Configuration

The default configuration is in configs/config.ini. Additional configuration can be added
to config.d directory, usually installed in /etc/ps-collector/config.d/. An example RabbitMQ
configuration is:

[rabbitmq]

username = nma
password = password
rabbit_host = example.com
virtual_host = vhost
queue = osg-nma-q
exchange = osg.ps.raw
routing_key = osg-nma-q

Place this in a file in the config.d directory.

## Running the Collector

An example `docker-compose` file is provided. It is recommended to modify the `docker-compose.yml` file to run and start the collector.
5 changes: 5 additions & 0 deletions bin/ps-collector
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env python

import ps_collector.scheduler

ps_collector.scheduler.main()
6 changes: 6 additions & 0 deletions configs/10-site-local.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

#
# This is the config file for site-configs.
# Items in this file (or the directory) will override
# default configuration values.
#
52 changes: 52 additions & 0 deletions configs/config.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#
# WARNING: DO NOT EDIT THIS CONFIGURATION FILE.
# It will be overwritten on upgrade.
#
# Instead, put site customizations in /etc/ps-collector/config.d
#

[General]

# The location of the config.d directory; place
# site-custom config files here.
#config_directory = /etc/ps-collector/config.d
config_directory = ./config.d

# The location of the logging configuration
logging_configuration = configs/logging-config.ini

[Scheduler]

# The amount of time, in minutes, between
# queries to the mesh configuration.
mesh_interval = 15

# The amount of time, in minutes, between
# queries to the remote perfSonar endpoints.
probe_interval = 5

# Number of processes to query all of the perfsonar hosts
# Experimentally determined that 200 is a reasonable number
pool_size = 200

[Mesh]

# The mesh configuration to utilize for discovering
# perfSonar endpoints to monitor.
endpoint = https://psconfig.opensciencegrid.org/pub/config


[org.osg.general.perfsonar-rabbitmq-simple args]

summary = False

maxstart = 32800
allowedEvents = packet-loss-rate,packet-trace,packet-retransmits,throughput,throughput-subintervals,failures,packet-count-sent,packet-count-lost,histogram-owdelay,histogram-ttl,packet-retransmits-subintervals,packet-loss-rate-bidir,packet-count-lost-bidir
tmpdirectory = /var/lib/ps-collector

usercert = /etc/grid-security/ps_collector/cert.pem
userkey = /etc/grid-security/ps_collector/key.pem

#mq max message size
mq-max-message-size = 10000

24 changes: 24 additions & 0 deletions configs/logging-config.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

[loggers]
keys=root

[handlers]
keys=stdout

[formatters]
keys=default

[logger_root]
level=INFO
handlers=stdout

[handler_stdout]
class=StreamHandler
level=NOTSET
formatter=default
args=(sys.stdout,)

[formatter_default]
format=%(asctime)s %(levelname)s %(process)d %(name)s: %(message)s
class=logging.Formatter

17 changes: 17 additions & 0 deletions configs/ps-collector.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[Unit]
Description=Data collector for perfSonar endpoints
Requires=network-online.target
After=network-online.target

[Service]
ExecStart=/usr/bin/ps-collector
User=pscollector
Group=pscollector
Type=simple
Restart=on-abort
RestartSec=1 min
KillMode=control-group
LimitNOFILE=65536

[Install]
WantedBy=multi-user.target
6 changes: 6 additions & 0 deletions configs/ps-collector.state
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

NOTE:

This directory contains the state files for the ps-collector service.
They record the last successful timestamp of data collected by the service,
hashed by the name of the remote perfSonar endpoint.
4 changes: 0 additions & 4 deletions etc/condor-cron/config.d/50-rsv-perfsonar.config

This file was deleted.

This file was deleted.

This file was deleted.

9 changes: 0 additions & 9 deletions etc/meta/metrics/org.osg.general.perfsonar-simple.meta

This file was deleted.

11 changes: 0 additions & 11 deletions etc/meta/metrics/org.osg.local.network-monitoring-local.meta

This file was deleted.

23 changes: 0 additions & 23 deletions etc/metrics/org.osg.general.perfsonar-activemq-simple.conf

This file was deleted.

28 changes: 0 additions & 28 deletions etc/metrics/org.osg.general.perfsonar-rabbitmq-simple.conf

This file was deleted.

21 changes: 0 additions & 21 deletions etc/metrics/org.osg.general.perfsonar-simple.conf

This file was deleted.

10 changes: 0 additions & 10 deletions etc/metrics/org.osg.local.network-monitoring-local.conf

This file was deleted.

14 changes: 0 additions & 14 deletions etc/stompclt/default.conf

This file was deleted.

Loading