mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-31 21:41:33 +00:00
continue docker-compose work on netdata (WIP)
This commit is contained in:
parent
6847a08d21
commit
417b626d39
6 changed files with 237 additions and 3 deletions
|
@ -167,12 +167,16 @@ services:
|
|||
image: netdata/netdata
|
||||
ports:
|
||||
- 19999:19999
|
||||
environment:
|
||||
- MONITOR_URL=https://haproxy:443/monitor
|
||||
volumes:
|
||||
- ./docker/netdata/netdatalib:/var/lib/netdata
|
||||
- ./docker/netdata/netdatacache:/var/cache/netdata
|
||||
- ./docker/netdata/netdataconfig/data_request.conf:/usr/lib/netdata/conf.d/python.d/data_request.conf
|
||||
- ./docker/netdata/netdataconfig/netdata.conf:/etc/netdata/netdata.conf
|
||||
- ./docker/netdata/netdataconfig/data_request.py:/usr/libexec/netdata/python.d/data_request.py
|
||||
- ./docker/netdata/netdata.conf:/etc/netdata/netdata.conf
|
||||
- ./docker/netdata/netdataconfig/python.d/newsblur_data_request.py:/usr/libexec/netdata/python.d/newsblur_data_request.chart.py
|
||||
- ./docker/netdata/netdataconfig/python.d.conf:/usr/lib/netdata/conf.d/python.d.conf
|
||||
- ./docker/netdata/netdataconfig/python.d/newsblur_data_request.conf:/usr/lib/netdata/conf.d/python.d/newsblur_data_request.conf
|
||||
- ./utils/netdata/config/go.d.conf:/usr/lib/netdata/conf.d/go.d.conf
|
||||
- /etc/passwd:/host/etc/passwd:ro
|
||||
- /etc/group:/host/etc/group:ro
|
||||
- /proc:/host/proc:ro
|
||||
|
|
10
utils/netdata/.bash_history
Normal file
10
utils/netdata/.bash_history
Normal file
|
@ -0,0 +1,10 @@
|
|||
|
||||
/usr/libexec/netdata/python.d/example.py debug
|
||||
ls /etc/netdata/python.d
|
||||
whoami
|
||||
./python.d.plugin example debug trace
|
||||
ls
|
||||
cat python.d.plugin
|
||||
./python.d.plugin example debug trace
|
||||
ls
|
||||
./python.d.plugin example debug trace
|
75
utils/netdata/config/go.d.conf
Normal file
75
utils/netdata/config/go.d.conf
Normal file
|
@ -0,0 +1,75 @@
|
|||
# netdata go.d.plugin configuration
|
||||
#
|
||||
# This file is in YAML format.
|
||||
|
||||
# Enable/disable the whole go.d.plugin.
|
||||
enabled: no
|
||||
|
||||
# Enable/disable default value for all modules.
|
||||
default_run: no
|
||||
|
||||
# Maximum number of used CPUs. Zero means no limit.
|
||||
max_procs: 0
|
||||
|
||||
# Enable/disable specific g.d.plugin module
|
||||
# If you want to change any value, you need to uncomment out it first.
|
||||
# IMPORTANT: Do not remove all spaces, just remove # symbol. There should be a space before module name.
|
||||
modules:
|
||||
# activemq: yes
|
||||
# apache: yes
|
||||
# bind: yes
|
||||
# cockroachdb: yes
|
||||
# consul: yes
|
||||
# coredns: yes
|
||||
# couchbase: yes
|
||||
# couchdb: yes
|
||||
# dnsdist: yes
|
||||
# dnsmasq: yes
|
||||
# dnsmasq_dhcp: yes
|
||||
# dns_query: yes
|
||||
# docker_engine: yes
|
||||
# dockerhub: yes
|
||||
# elasticsearch: yes
|
||||
# example: no
|
||||
# filecheck: yes
|
||||
# fluentd: yes
|
||||
# freeradius: yes
|
||||
# hdfs: yes
|
||||
# httpcheck: yes
|
||||
# isc_dhcpd: yes
|
||||
# k8s_kubelet: yes
|
||||
# k8s_kubeproxy: yes
|
||||
# lighttpd: yes
|
||||
# lighttpd2: yes
|
||||
# logstash: yes
|
||||
# mysql: yes
|
||||
# nginx: yes
|
||||
# nginxvts: yes
|
||||
# openvpn: yes
|
||||
# phpdaemon: yes
|
||||
# phpfpm: yes
|
||||
# pihole: yes
|
||||
# pika: yes
|
||||
# portcheck: yes
|
||||
# powerdns: yes
|
||||
# powerdns_recursor: yes
|
||||
# prometheus: yes
|
||||
# pulsar: yes
|
||||
# rabbitmq: yes
|
||||
# redis: yes
|
||||
# scaleio: yes
|
||||
# solr: yes
|
||||
# springboot2: yes
|
||||
# squidlog: yes
|
||||
# supervisord: yes
|
||||
# systemdunits: yes
|
||||
# tengine: yes
|
||||
# unbound: yes
|
||||
# vernemq: yes
|
||||
# vcsa: yes
|
||||
# vsphere: yes
|
||||
# web_log: yes
|
||||
# whoisquery: yes
|
||||
# wmi: yes
|
||||
# x509check: yes
|
||||
# zookeeper: yes
|
51
utils/netdata/example.py
Normal file
51
utils/netdata/example.py
Normal file
|
@ -0,0 +1,51 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Description: example netdata python.d module
|
||||
# Author: Put your name here (your github login)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
from random import SystemRandom
|
||||
|
||||
from bases.FrameworkServices.SimpleService import SimpleService
|
||||
|
||||
priority = 90000
|
||||
|
||||
ORDER = [
|
||||
'random',
|
||||
]
|
||||
|
||||
CHARTS = {
|
||||
'random': {
|
||||
'options': [None, 'A random number', 'random number', 'random', 'random', 'line'],
|
||||
'lines': [
|
||||
['random1']
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class Service(SimpleService):
|
||||
def __init__(self, configuration=None, name=None):
|
||||
SimpleService.__init__(self, configuration=configuration, name=name)
|
||||
self.order = ORDER
|
||||
self.definitions = CHARTS
|
||||
self.random = SystemRandom()
|
||||
self.num_lines = self.configuration.get('num_lines', 4)
|
||||
self.lower = self.configuration.get('lower', 0)
|
||||
self.upper = self.configuration.get('upper', 100)
|
||||
|
||||
@staticmethod
|
||||
def check():
|
||||
return True
|
||||
|
||||
def get_data(self):
|
||||
data = dict()
|
||||
|
||||
for i in range(0, self.num_lines):
|
||||
dimension_id = ''.join(['random', str(i)])
|
||||
|
||||
if dimension_id not in self.charts['random']:
|
||||
self.charts['random'].add_dimension([dimension_id])
|
||||
|
||||
data[dimension_id] = self.random.randint(self.lower, self.upper)
|
||||
|
||||
return data
|
0
utils/netdata/go.d.conf
Executable file
0
utils/netdata/go.d.conf
Executable file
94
utils/netdata/newsblur.py
Normal file
94
utils/netdata/newsblur.py
Normal file
|
@ -0,0 +1,94 @@
|
|||
import os
|
||||
os.environ["DJANGO_SETTINGS_MODULE"] = "newsblur_web.settings"
|
||||
|
||||
from bases.FrameworkServices.SimpleService import SimpleService
|
||||
|
||||
priority = 90000
|
||||
|
||||
ORDER = [
|
||||
'NewsBlur App Server Page Loads - by day',
|
||||
'NewsBlur App Server Page Loads - by week',
|
||||
'NewsBlur App Server Times - by day',
|
||||
'NewsBlur App Server Times - by week',
|
||||
'NewsBlur Classifiers - by day',
|
||||
'NewsBlur Classifiers - by week',
|
||||
'NewsBlur DB Times - by day',
|
||||
'NewsBlur DB Times - by week',
|
||||
'NewsBlur Feed Counts - by day',
|
||||
'NewsBlur Feed Counts - by week',
|
||||
'NewsBlur Feeds & Subscriptions - by day',
|
||||
'NewsBlur Feeds & Subscriptions - by week',
|
||||
'NewsBlur Fetching History - by day',
|
||||
'NewsBlur Fetching History - by week'
|
||||
'NewsBlur Load Times - by day',
|
||||
'NewsBlur Load Times - by week',
|
||||
'NewsBlur Stories - by day',
|
||||
'NewsBlur Stories - by week',
|
||||
'NewsBlur Task Codes - by day',
|
||||
'NewsBlur Task Codes - by week',
|
||||
'NewsBlur Task Pipeline - by day',
|
||||
'NewsBlur Task Pipeline - by week',
|
||||
'NewsBlur Task Server Fetches - by day',
|
||||
'NewsBlur Task Server Fetches - by week',
|
||||
'NewsBlur Task Server Times - by day',
|
||||
'NewsBlur Task Server Times - by week',
|
||||
'NewsBlur Updates - by day',
|
||||
'NewsBlur Updates - by week',
|
||||
'NewsBlur Users - by day',
|
||||
'NewsBlur Users - by week'
|
||||
]
|
||||
|
||||
CHARTS = {
|
||||
'NewsBlur Updates': {
|
||||
#'options': [name, title, units, family, context, charttype],
|
||||
'options': [
|
||||
'NewsBlur App Server Page Loads - by day',
|
||||
'NewsBlur App Server Page Loads - by day',
|
||||
'# of page loads / server',
|
||||
'App Server',
|
||||
None,
|
||||
'stacked'
|
||||
]
|
||||
'lines': [
|
||||
[
|
||||
'Queued Feeds',
|
||||
'Fetched feeds last hour',
|
||||
'Tasked Feeds',
|
||||
'Error Feeds',
|
||||
'Celery - Update Feeds',
|
||||
'Celery - New Feeds',
|
||||
'Celery - Push Feeds',
|
||||
'Celery - Work Queue',
|
||||
'Celery - Search Queue',
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class Service(SimpleService):
|
||||
def __init__(self, configuration=None, name=None):
|
||||
SimpleService.__init__(self, configuration=configuration, name=name)
|
||||
self.order = ORDER
|
||||
self.definitions = CHARTS
|
||||
self.random = SystemRandom()
|
||||
self.num_lines = self.configuration.get('num_lines', 4)
|
||||
self.lower = self.configuration.get('lower', 0)
|
||||
self.upper = self.configuration.get('upper', 100)
|
||||
|
||||
@staticmethod
|
||||
def check():
|
||||
return True
|
||||
|
||||
def get_data(self):
|
||||
data = dict()
|
||||
|
||||
for i in range(0, self.num_lines):
|
||||
dimension_id = ''.join(['random', str(i)])
|
||||
|
||||
if dimension_id not in self.charts['random']:
|
||||
self.charts['random'].add_dimension([dimension_id])
|
||||
|
||||
data[dimension_id] = self.random.randint(self.lower, self.upper)
|
||||
|
||||
return data
|
Loading…
Add table
Reference in a new issue