1
0
mirror of https://github.com/r4sas/Niflheim-api synced 2025-01-11 15:37:59 +00:00
Server to collect DHT views from yggdrasil nodes and store in a data base
Go to file
r4sas 8897b48fc9 update files, add map and few more scripts
Signed-off-by: r4sas <r4sas@i2pmail.org>
2022-12-10 14:24:47 +00:00
api update files, add map and few more scripts 2022-12-10 14:24:47 +00:00
.gitignore add importer from yggcrawl, update template 2020-06-04 13:19:05 +00:00
api.png Add files via upload 2018-11-14 21:15:17 +01:00
LICENSE Initial commit 2018-06-26 23:54:03 +02:00
pgsql.sql add pgsql database structure 2019-12-31 23:11:13 +00:00
README.md update files, add map and few more scripts 2022-12-10 14:24:47 +00:00
requirements.txt correction updates, make it usable 2019-12-31 23:05:57 +00:00
ygg-crawl.sh update files, add map and few more scripts 2022-12-10 14:24:47 +00:00
yggapi.service update files, add map and few more scripts 2022-12-10 14:24:47 +00:00

Yggdrasil-monitor

Yggdrasil-monitor provides both a web interface and an api. The web interface is used to see some basic stats on the data has collected by crawler and the API provides raw data in JSON format.

Install & Setup

Install the following python packages either via your package manager or Pip:

flask  
flask_restful  
psycopg2  

Configure niflheim-api.py to use the Postgres databse you setup for vserv.py.

So open niflheim-api.py:

DB_PASSWORD = "password"
DB_USER = "yggindex"
DB_NAME = "yggindex"
DB_HOST = "localhost"

Make sure the above matches what you have in the crawler.

The API will startup on port 3000 and accept all ipv6 connections if you want to change this edit the last line:

app.run(host='::', port=3000)

Accessing the API data:

http://exmaple.com:3000/current  

Add yggapi.services to systemd.