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

Developing a new plugin questions #5235

Closed
bitcoiners opened this issue Jan 21, 2019 · 29 comments
Closed

Developing a new plugin questions #5235

bitcoiners opened this issue Jan 21, 2019 · 29 comments
Assignees
Labels

Comments

@bitcoiners
Copy link

I am developing a new netdata plugin (likely node.d) and have a few questions getting started.

  1. How to check what plugins are currently running in netdata service? Want to make sure my plugin was correctly installed and enabled.

  2. How to debug a node.d plugin? (need to be able to set breakpoints and step through code)

  3. How to add runtime requirements for a node.d plugin? Need to add packages like node-datetime.

@bitcoiners
Copy link
Author

I wanted to start with an example plugin and create a custom dashboard to display its chart.
Since there is no "hello world" example available for node.d I picked python.d example
https://github.com/netdata/netdata/tree/master/collectors/python.d.plugin/example
for custom dashboard I started with
/usr/share/netdata/web/demo.html and added a div for "random" chard id that example plugin supposed to create.

<div data-netdata="random"
        data-dimensions="user"
        data-chart-library="dygraph"
        data-dygraph-theme="sparkline"
        data-width="200px"
        data-height="30px"
        data-after="-60"
        data-points="60"
        data-colors="#FF5555"
        ></div>

but got error.
random: chart not found on url "/api/v1/chart?chart=random"

maybe example plugin is not running...?

@cakrit
Copy link
Contributor

cakrit commented Jan 21, 2019

/etc/netdata/edit-config python.d.conf, set example = yes.
After restart, you will see on right navbar a menu for example. This means it's running.
You will note that the chart is called example.random, so you would need to correct the data-netdata if you want it to appear in a custom dashboard.

The documentation is not very clear on this, so I will keep this as a task to improve it.

@cakrit cakrit self-assigned this Jan 21, 2019
@cakrit cakrit added this to Triage in Documentation via automation Jan 21, 2019
@cakrit cakrit added the feature request New features label Jan 21, 2019
@bitcoiners
Copy link
Author

bitcoiners commented Jan 21, 2019

I created a file /etc/netdata/python.d.conf with

set example = yes

and restarted netdata.
Also changed view to

    <div data-netdata="example.random"
            data-dimensions="user"
            data-chart-library="dygraph"
            data-dygraph-theme="sparkline"
            data-width="200px"
            data-height="30px"
            data-after="-60"
            data-points="60"
            data-colors="#FF5555"
            ></div>

but I still get

example.random: chart not found on url "/api/v1/chart?chart=example.random"

and I don't see any new charts on main dashboard.

@cakrit
Copy link
Contributor

cakrit commented Jan 21, 2019

No, please delete that conf file and do it with edit-config. There is a stock configuration file (usually in /usr/lib/netdata/conf.d/python.d.conf that already has the default configuration. You can also copy it, if you don't like edit-config for some reason. You will see in that file a line that says example = no and you just change it to example = yes and save it.

The first thing after you restart is to wait for about 10sec and ensure that on the right side you see a submenu called Example.

@bitcoiners
Copy link
Author

bitcoiners commented Jan 22, 2019

Ok. Thanks. Looks like I got python.d example plugin working and a view to see its chart.

Now I am trying to create a similar example plugin for node.d and a view for its sample chart.
I created a basic plugin called foo
https://github.com/cryptomooner/netdata/tree/master/collectors/node.d.plugin/foo
using instructions from ( https://docs.netdata.cloud/collectors/node.d.plugin/ )

Unfortunately instructions do not show code for a complete plugin leaving out info on chart creation, updating.. and code looks quite different from python example. So I looked at other node.d plugins available and tried to reuse code from them.

However after installing this plugin
(added foo.node.js to /usr/libexec/netdata/node.d/, modified /etc/netdata/node.d.conf to enable it )
and restarting netdata
I don't see a new chart 'foo.random' in http://localhost:19999/api/v1/charts
nor does it show up in my sample page.

Can someone please take a look at foo plugin and let me know why it is not working?

  1. How to debug a node.d plugin? (need to be able to set breakpoints and step through code)

  2. How to add runtime requirements for a node.d plugin? Need to add packages like node-datetime.

@cakrit
Copy link
Contributor

cakrit commented Jan 22, 2019

We would like to obsolete the node.d plugin at some point in the future. Is it really difficult for you to work with python? In any case, the precise instructions are here. You will notice after reading them, that you haven't even put it in the right directory, so the node.d module orchestrator doesn't know anything about it.

@bitcoiners
Copy link
Author

Well I would prefer to code it in ruby which is my favorite, but javascript is second best.
Ok. Will give python a try..

@bitcoiners
Copy link
Author

bitcoiners commented Jan 22, 2019

Still having a few starting problems :)
I created a new python plugin https://github.com/cryptomooner/netdata/tree/master/collectors/python.d.plugin/nodeos
by copying example plugin and renaming, and updating for new name.
Having trouble installing it on locally running netdata service.
I modified cat /etc/netdata/python.d.conf
added
nodeos: yes
copied nodeos.chart.py to /usr/libexec/netdata/python.d/
copied nodeos.conf to /etc/netdata/python.d/
and restarted netdata,
checked
http://localhost:19999/api/v1/charts
but do not see
nodeos.random chart I expected to appear.
What am I missing?

@bitcoiners
Copy link
Author

bitcoiners commented Jan 22, 2019

Also I am not sure how to enable an existing nginx plugin.
I added

	location /stub_status {
		stub_status;
		# Security: Only allow access from the IP below.
		allow 127.0.0.1;
		# Deny anyone else
		deny all;
	}

to /etc/nginx/sites-enabled/default

set

nginx: yes

in /etc/netdata/python.d.conf
and restarted nginx and netdata, but don't see nginx charts in main dashboard or http://localhost:19999/api/v1/charts

@ilyam8
Copy link
Member

ilyam8 commented Jan 22, 2019

Hi @bitcoiners

python.d.plugin has debug mode

./python.d.plugin <module_name> debug trace 1

run it as netdata user

@bitcoiners
Copy link
Author

bitcoiners commented Jan 22, 2019

/usr/libexec/netdata/plugins.d/python.d.plugin nginx debug trace
2019-01-22 22:07:44: python.d INFO: plugin: main: Using python 2
2019-01-22 22:07:44: python.d DEBUG: plugin: main: loading '/etc/netdata/python.d.conf'
2019-01-22 22:07:44: python.d DEBUG: plugin: main: module load source: 'nginx' => [OK]
2019-01-22 22:07:44: python.d DEBUG: plugin: main: loading '/etc/netdata/python.d/nginx.conf'
2019-01-22 22:07:44: python.d DEBUG: plugin: main: job initialization: 'nginx localhost' => ['OK']
2019-01-22 22:07:44: python.d DEBUG: plugin: main: module status: 'nginx' => [OK] (jobs: 1)
2019-01-22 22:07:44: python.d DEBUG: nginx: localhost: Url: http://localhost/stub_status. Http response status code: 404
2019-01-22 22:07:44: python.d ERROR: nginx: localhost: _get_data() returned no data or type is not <dict>
2019-01-22 22:07:44: python.d INFO: nginx: localhost: check() => [FAILED]
2019-01-22 22:07:44: python.d INFO: plugin: main: FINISHED


http://localhost/stub_status
returns

File does not exist, or is not accessible: /usr/share/netdata/web/stub_status

/usr/share/netdata/web/stub_status: No such file or directory

@ilyam8
Copy link
Member

ilyam8 commented Jan 22, 2019

@bitcoiners sorry, i am a little bit lost, what are you trying to achieve? Configure nginx stub_status? write a node.d module? python module?

@bitcoiners
Copy link
Author

bitcoiners commented Jan 22, 2019

I am trying to create a new python plugin, it will be similar to nginx plugin, so I am trying to enable it too.
Ok, looks like I enabled nginx plugin. Now just need to get my new plugin to work.

@bitcoiners
Copy link
Author

So here is the latest.

Still having a few starting problems :)
I created a new python plugin https://github.com/cryptomooner/netdata/tree/master/collectors/python.d.plugin/nodeos
by copying example plugin and renaming, and updating for new name.
Having trouble installing it on locally running netdata service.
I modified cat /etc/netdata/python.d.conf
added
nodeos: yes
copied nodeos.chart.py to /usr/libexec/netdata/python.d/
copied nodeos.conf to /etc/netdata/python.d/
and restarted netdata,
checked
http://localhost:19999/api/v1/charts
but do not see
nodeos.random chart I expected to appear.
What am I missing?

@bitcoiners
Copy link
Author

bitcoiners commented Jan 23, 2019

chart nodeos.random does not show up in http://localhost:19999/api/v1/charts

EXPAND
/usr/libexec/netdata/plugins.d/python.d.plugin nodeos debug trace
2019-01-23 09:42:50: python.d INFO: plugin: main: Using python 2
2019-01-23 09:42:50: python.d DEBUG: plugin: main: loading '/etc/netdata/python.d.conf'
2019-01-23 09:42:50: python.d DEBUG: plugin: main: module load source: 'nodeos' => [OK]
2019-01-23 09:42:50: python.d DEBUG: plugin: main: loading '/etc/netdata/python.d/nodeos.conf'
2019-01-23 09:42:50: python.d DEBUG: plugin: main: job initialization: 'nodeos nodeos' => ['OK']
2019-01-23 09:42:50: python.d DEBUG: plugin: main: module status: 'nodeos' => [OK] (jobs: 1)
2019-01-23 09:42:50: python.d INFO: nodeos: nodeos: check() => [OK]
CHART netdata.runtime_nodeos '' 'Execution time for nodeos' 'ms' 'python.d' netdata.pythond_runtime line 145000 1
DIMENSION run_time 'run time' absolute 1 1

2019-01-23 09:42:50: python.d DEBUG: nodeos: nodeos: create() => [OK] (charts: 1)
2019-01-23 09:42:50: python.d DEBUG: nodeos: nodeos: started, update frequency: 1
CHART nodeos.random '' 'A random number' 'random number' 'random' 'random' line 90000 1 '' 'python.d.plugin' 'nodeos'
DIMENSION 'random1' 'random1' absolute 1 1 ''
DIMENSION 'random2' 'random2' absolute 1 1 ''
DIMENSION 'random3' 'random3' absolute 1 1 ''

BEGIN nodeos.random 0
SET 'random1' = 43
SET 'random2' = 98
SET 'random3' = 16
END

BEGIN netdata.runtime_nodeos 0
SET run_time = 0
END
...

@ilyam8
Copy link
Member

ilyam8 commented Jan 23, 2019

What am I missing?

chek error.log - grep nodeos error.log

@bitcoiners
Copy link
Author

nothing 'nodeos' in the log

sudo grep nodeos /var/log/netdata/error.log

@ilyam8
Copy link
Member

ilyam8 commented Jan 23, 2019

i am not sure why it is not working for you.

what i did:

  • cd to python.d
  • cp example.chart.py example2.chart.py
  • restart netdata.service

i see example2 on the dashboard

@bitcoiners
Copy link
Author

bitcoiners commented Jan 23, 2019

cd /usr/libexec/netdata/python.d
sudo cp example.chart.py example2.chart.py 
sudo systemctl restart netdata

I do not see example2.random chart in http://localhost:19999/api/v1/charts or on main dashboard

@ilyam8
Copy link
Member

ilyam8 commented Jan 23, 2019

do you see it on the dashboard http://localhost:19999 ?

@bitcoiners
Copy link
Author

no. only one example chart
image

@ilyam8
Copy link
Member

ilyam8 commented Jan 23, 2019

check error.log

i suggest

  • cp /dev/nul error.log
  • restart netdata.service
  • grep python error.log

post here grep result (using collapsible markdown syntax)

@bitcoiners
Copy link
Author

bitcoiners commented Jan 23, 2019

Done. result below

EXPAND
2019-01-23 15:47:10: netdata INFO  : PLUGINSD : stopping plugin thread: plugin:python.d
2019-01-23 15:47:10: netdata INFO  : PLUGINSD[python.d] : data collection thread exiting
2019-01-23 15:47:10: netdata INFO  : PLUGINSD[python.d] : killing child process pid 19649
2019-01-23 15:47:10: netdata INFO  : PLUGINSD[python.d] : waiting for child process pid 19649 to exit...
2019-01-23 15:47:10: netdata INFO  : PLUGINSD[python.d] : thread with task id 19642 finished
2019-01-23 15:47:10: netdata INFO  : PLUGINSD[python.d] : thread created with task id 22493
2019-01-23 15:47:10: netdata INFO  : PLUGINSD[python.d] : connected to '/usr/lib/x86_64-linux-gnu/netdata/plugins.d/python.d.plugin' running on pid 22498
2019-01-23 15:47:11: python.d INFO: plugin: main: Using python 2
2019-01-23 15:47:11: python.d ERROR: plugin: main: module load source: 'apache' => [FAILED]
2019-01-23 15:47:11: python.d ERROR: plugin: main: load source error : No module named urllib3
2019-01-23 15:47:11: python.d ERROR: plugin: main: module load config: 'beanstalk' => [FAILED]
2019-01-23 15:47:11: python.d ERROR: plugin: main: load config error : [Errno 2] No such file or directory: '/etc/netdata/python.d/beanstalk.conf'
2019-01-23 15:47:11: python.d ERROR: plugin: main: module load config: 'bind_rndc' => [FAILED]
2019-01-23 15:47:11: python.d ERROR: plugin: main: load config error : [Errno 2] No such file or directory: '/etc/netdata/python.d/bind_rndc.conf'
2019-01-23 15:47:11: python.d ERROR: plugin: main: module load source: 'couchdb' => [FAILED]
2019-01-23 15:47:11: python.d ERROR: plugin: main: load source error : No module named urllib3
2019-01-23 15:47:11: python.d ERROR: plugin: main: module load config: 'cpufreq' => [FAILED]
2019-01-23 15:47:11: python.d ERROR: plugin: main: load config error : [Errno 2] No such file or directory: '/etc/netdata/python.d/cpufreq.conf'
2019-01-23 15:47:11: python.d ERROR: plugin: main: module load config: 'cpuidle' => [FAILED]
2019-01-23 15:47:11: python.d ERROR: plugin: main: load config error : [Errno 2] No such file or directory: '/etc/netdata/python.d/cpuidle.conf'
2019-01-23 15:47:11: python.d ERROR: plugin: main: module load config: 'dns_query_time' => [FAILED]
2019-01-23 15:47:11: python.d ERROR: plugin: main: load config error : [Errno 2] No such file or directory: '/etc/netdata/python.d/dns_query_time.conf'
2019-01-23 15:47:11: python.d ERROR: plugin: main: module load source: 'dnsdist' => [FAILED]
2019-01-23 15:47:11: python.d ERROR: plugin: main: load source error : No module named urllib3
2019-01-23 15:47:11: python.d ERROR: plugin: main: module load config: 'dovecot' => [FAILED]
2019-01-23 15:47:11: python.d ERROR: plugin: main: load config error : [Errno 2] No such file or directory: '/etc/netdata/python.d/dovecot.conf'
2019-01-23 15:47:11: python.d ERROR: plugin: main: module load source: 'elasticsearch' => [FAILED]
2019-01-23 15:47:11: python.d ERROR: plugin: main: load source error : No module named urllib3
2019-01-23 15:47:11: python.d ERROR: plugin: main: module load config: 'example' => [FAILED]
2019-01-23 15:47:11: python.d ERROR: plugin: main: load config error : [Errno 2] No such file or directory: '/etc/netdata/python.d/example.conf'
2019-01-23 15:47:11: python.d ERROR: plugin: main: module load config: 'fail2ban' => [FAILED]
2019-01-23 15:47:11: python.d ERROR: plugin: main: load config error : [Errno 2] No such file or directory: '/etc/netdata/python.d/fail2ban.conf'
2019-01-23 15:47:11: python.d ERROR: plugin: main: module load config: 'freeradius' => [FAILED]
2019-01-23 15:47:11: python.d ERROR: plugin: main: load config error : [Errno 2] No such file or directory: '/etc/netdata/python.d/freeradius.conf'
2019-01-23 15:47:11: python.d ERROR: plugin: main: module load source: 'haproxy' => [FAILED]
2019-01-23 15:47:11: python.d ERROR: plugin: main: load source error : No module named urllib3
2019-01-23 15:47:11: python.d ERROR: plugin: main: module load config: 'hddtemp' => [FAILED]
2019-01-23 15:47:11: python.d ERROR: plugin: main: load config error : [Errno 2] No such file or directory: '/etc/netdata/python.d/hddtemp.conf'
2019-01-23 15:47:11: python.d ERROR: plugin: main: module load source: 'httpcheck' => [FAILED]
2019-01-23 15:47:11: python.d ERROR: plugin: main: load source error : No module named urllib3
2019-01-23 15:47:11: python.d ERROR: plugin: main: module load source: 'icecast' => [FAILED]
2019-01-23 15:47:11: python.d ERROR: plugin: main: load source error : No module named urllib3
2019-01-23 15:47:11: python.d ERROR: plugin: main: module load source: 'ipfs' => [FAILED]
2019-01-23 15:47:11: python.d ERROR: plugin: main: load source error : No module named urllib3
2019-01-23 15:47:11: python.d ERROR: plugin: main: module load config: 'isc_dhcpd' => [FAILED]
2019-01-23 15:47:11: python.d ERROR: plugin: main: load config error : [Errno 2] No such file or directory: '/etc/netdata/python.d/isc_dhcpd.conf'
2019-01-23 15:47:11: python.d ERROR: plugin: main: module load config: 'mdstat' => [FAILED]
2019-01-23 15:47:11: python.d ERROR: plugin: main: load config error : [Errno 2] No such file or directory: '/etc/netdata/python.d/mdstat.conf'
2019-01-23 15:47:11: python.d ERROR: plugin: main: module load config: 'memcached' => [FAILED]
2019-01-23 15:47:11: python.d ERROR: plugin: main: load config error : [Errno 2] No such file or directory: '/etc/netdata/python.d/memcached.conf'
2019-01-23 15:47:11: python.d ERROR: plugin: main: module load config: 'mongodb' => [FAILED]
2019-01-23 15:47:11: python.d ERROR: plugin: main: load config error : [Errno 2] No such file or directory: '/etc/netdata/python.d/mongodb.conf'
2019-01-23 15:47:11: python.d ERROR: plugin: main: module load source: 'nginx' => [FAILED]
2019-01-23 15:47:11: python.d ERROR: plugin: main: load source error : No module named urllib3
2019-01-23 15:47:11: python.d ERROR: plugin: main: module load source: 'nginx_plus' => [FAILED]
2019-01-23 15:47:11: python.d ERROR: plugin: main: load source error : No module named urllib3
2019-01-23 15:47:11: python.d ERROR: plugin: main: module load config: 'nsd' => [FAILED]
2019-01-23 15:47:11: python.d ERROR: plugin: main: load config error : [Errno 2] No such file or directory: '/etc/netdata/python.d/nsd.conf'
2019-01-23 15:47:11: python.d ERROR: plugin: main: module load config: 'ovpn_status_log' => [FAILED]
2019-01-23 15:47:11: python.d ERROR: plugin: main: load config error : [Errno 2] No such file or directory: '/etc/netdata/python.d/ovpn_status_log.conf'
2019-01-23 15:47:11: python.d ERROR: plugin: main: module load source: 'phpfpm' => [FAILED]
2019-01-23 15:47:11: python.d ERROR: plugin: main: load source error : No module named urllib3
2019-01-23 15:47:11: python.d ERROR: plugin: main: module load config: 'postfix' => [FAILED]
2019-01-23 15:47:11: python.d ERROR: plugin: main: load config error : [Errno 2] No such file or directory: '/etc/netdata/python.d/postfix.conf'
2019-01-23 15:47:11: python.d ERROR: plugin: main: module load source: 'powerdns' => [FAILED]
2019-01-23 15:47:11: python.d ERROR: plugin: main: load source error : No module named urllib3
2019-01-23 15:47:11: python.d ERROR: plugin: main: module load source: 'rabbitmq' => [FAILED]
2019-01-23 15:47:11: python.d ERROR: plugin: main: load source error : No module named urllib3
2019-01-23 15:47:11: python.d ERROR: plugin: main: module load config: 'redis' => [FAILED]
2019-01-23 15:47:11: python.d ERROR: plugin: main: load config error : [Errno 2] No such file or directory: '/etc/netdata/python.d/redis.conf'
2019-01-23 15:47:11: python.d ERROR: plugin: main: module load source: 'retroshare' => [FAILED]
2019-01-23 15:47:11: python.d ERROR: plugin: main: load source error : No module named urllib3
2019-01-23 15:47:11: python.d ERROR: plugin: main: module load config: 'samba' => [FAILED]
2019-01-23 15:47:11: python.d ERROR: plugin: main: load config error : [Errno 2] No such file or directory: '/etc/netdata/python.d/samba.conf'
2019-01-23 15:47:11: python.d ERROR: plugin: main: module load config: 'sensors' => [FAILED]
2019-01-23 15:47:11: python.d ERROR: plugin: main: load config error : [Errno 2] No such file or directory: '/etc/netdata/python.d/sensors.conf'
2019-01-23 15:47:11: python.d ERROR: plugin: main: module load config: 'smartd_log' => [FAILED]
2019-01-23 15:47:11: python.d ERROR: plugin: main: load config error : [Errno 2] No such file or directory: '/etc/netdata/python.d/smartd_log.conf'
2019-01-23 15:47:11: python.d ERROR: plugin: main: module load source: 'springboot' => [FAILED]
2019-01-23 15:47:11: python.d ERROR: plugin: main: load source error : No module named urllib3
2019-01-23 15:47:11: python.d ERROR: plugin: main: module load config: 'squid' => [FAILED]
2019-01-23 15:47:11: python.d ERROR: plugin: main: load config error : [Errno 2] No such file or directory: '/etc/netdata/python.d/squid.conf'
2019-01-23 15:47:11: python.d ERROR: plugin: main: module load source: 'tomcat' => [FAILED]
2019-01-23 15:47:11: python.d ERROR: plugin: main: load source error : No module named urllib3
2019-01-23 15:47:11: python.d ERROR: plugin: main: module load source: 'traefik' => [FAILED]
2019-01-23 15:47:11: python.d ERROR: plugin: main: load source error : No module named urllib3
2019-01-23 15:47:11: python.d ERROR: plugin: main: module load config: 'varnish' => [FAILED]
2019-01-23 15:47:11: python.d ERROR: plugin: main: load config error : [Errno 2] No such file or directory: '/etc/netdata/python.d/varnish.conf'
2019-01-23 15:47:11: python.d ERROR: beanstalk: beanstalk: 'beanstalkc' module is needed to use beanstalk.chart.py
2019-01-23 15:47:11: python.d INFO: beanstalk: beanstalk: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: bind_rndc: bind_rndc: Can't locate "rndc" binary or binary is not executable by netdata
2019-01-23 15:47:11: python.d INFO: bind_rndc: bind_rndc: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: ceph: ceph: rados module is needed to use ceph.chart.py
2019-01-23 15:47:11: python.d INFO: ceph: ceph: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: cpufreq: cpufreq: No path specified. Using: '/sys/devices'
2019-01-23 15:47:11: python.d INFO: cpufreq: cpufreq: check() => [OK]
2019-01-23 15:47:11: python.d INFO: cpuidle: cpuidle: check() => [OK]
2019-01-23 15:47:11: python.d ERROR: dns_query_time: dns_query_time: server_list and domain_list can't be empty
2019-01-23 15:47:11: python.d INFO: dns_query_time: dns_query_time: check() => [FAILED]
2019-01-23 15:47:11: python.d INFO: dovecot: dovecot: check() => [FAILED]
2019-01-23 15:47:11: python.d INFO: example: example: check() => [OK]
2019-01-23 15:47:11: python.d ERROR: exim: local: "/usr/sbin/exim4" is not executable
2019-01-23 15:47:11: python.d INFO: exim: local: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: fail2ban: fail2ban: /var/log/fail2ban.log is not readable or empty
2019-01-23 15:47:11: python.d INFO: fail2ban: fail2ban: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: freeradius: freeradius: Can't locate "radclient" binary or binary is not executable by netdata
2019-01-23 15:47:11: python.d INFO: freeradius: freeradius: check() => [FAILED]
2019-01-23 15:47:11: python.d INFO: hddtemp: hddtemp: Autodetecting disks
2019-01-23 15:47:11: python.d ERROR: hddtemp: hddtemp: Failed to connect to "127.0.0.1", port 7634, error: [Errno 111] Connection refused
2019-01-23 15:47:11: python.d ERROR: hddtemp: hddtemp: no data received
2019-01-23 15:47:11: python.d INFO: hddtemp: hddtemp: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: isc_dhcpd: isc_dhcpd: Make sure '/var/lib/dhcp/dhcpd.leases' is exist and readable by netdata
2019-01-23 15:47:11: python.d INFO: isc_dhcpd: isc_dhcpd: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: mdstat: mdstat: Failed to read data from /proc/mdstat or there is no active arrays
2019-01-23 15:47:11: python.d INFO: mdstat: mdstat: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: memcached: memcached: Failed to connect to "127.0.0.1", port 11211, error: [Errno 111] Connection refused
2019-01-23 15:47:11: python.d INFO: memcached: memcached: check() => [FAILED]
2019-01-23 15:47:11: python.d INFO: mongodb: mongodb: check() => [OK]
2019-01-23 15:47:11: python.d ERROR: mysql: mycnf1: MySQLdb or PyMySQL module is needed to use mysql.chart.py plugin
2019-01-23 15:47:11: python.d INFO: mysql: mycnf1: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: mysql: mycnf2: MySQLdb or PyMySQL module is needed to use mysql.chart.py plugin
2019-01-23 15:47:11: python.d INFO: mysql: mycnf2: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: mysql: debiancnf: MySQLdb or PyMySQL module is needed to use mysql.chart.py plugin
2019-01-23 15:47:11: python.d INFO: mysql: debiancnf: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: mysql: socket1: MySQLdb or PyMySQL module is needed to use mysql.chart.py plugin
2019-01-23 15:47:11: python.d INFO: mysql: socket1: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: mysql: socket2: MySQLdb or PyMySQL module is needed to use mysql.chart.py plugin
2019-01-23 15:47:11: python.d INFO: mysql: socket2: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: mysql: socket3: MySQLdb or PyMySQL module is needed to use mysql.chart.py plugin
2019-01-23 15:47:11: python.d INFO: mysql: socket3: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: mysql: socket4: MySQLdb or PyMySQL module is needed to use mysql.chart.py plugin
2019-01-23 15:47:11: python.d INFO: mysql: socket4: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: mysql: tcp: MySQLdb or PyMySQL module is needed to use mysql.chart.py plugin
2019-01-23 15:47:11: python.d INFO: mysql: tcp: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: mysql: tcpipv4: MySQLdb or PyMySQL module is needed to use mysql.chart.py plugin
2019-01-23 15:47:11: python.d INFO: mysql: tcpipv4: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: mysql: tcpipv6: MySQLdb or PyMySQL module is needed to use mysql.chart.py plugin
2019-01-23 15:47:11: python.d INFO: mysql: tcpipv6: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: mysql: mycnf1_root: MySQLdb or PyMySQL module is needed to use mysql.chart.py plugin
2019-01-23 15:47:11: python.d INFO: mysql: mycnf1_root: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: mysql: mycnf2_root: MySQLdb or PyMySQL module is needed to use mysql.chart.py plugin
2019-01-23 15:47:11: python.d INFO: mysql: mycnf2_root: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: mysql: socket1_root: MySQLdb or PyMySQL module is needed to use mysql.chart.py plugin
2019-01-23 15:47:11: python.d INFO: mysql: socket1_root: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: mysql: socket2_root: MySQLdb or PyMySQL module is needed to use mysql.chart.py plugin
2019-01-23 15:47:11: python.d INFO: mysql: socket2_root: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: mysql: socket3_root: MySQLdb or PyMySQL module is needed to use mysql.chart.py plugin
2019-01-23 15:47:11: python.d INFO: mysql: socket3_root: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: mysql: socket4_root: MySQLdb or PyMySQL module is needed to use mysql.chart.py plugin
2019-01-23 15:47:11: python.d INFO: mysql: socket4_root: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: mysql: tcp_root: MySQLdb or PyMySQL module is needed to use mysql.chart.py plugin
2019-01-23 15:47:11: python.d INFO: mysql: tcp_root: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: mysql: tcpipv4_root: MySQLdb or PyMySQL module is needed to use mysql.chart.py plugin
2019-01-23 15:47:11: python.d INFO: mysql: tcpipv4_root: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: mysql: tcpipv6_root: MySQLdb or PyMySQL module is needed to use mysql.chart.py plugin
2019-01-23 15:47:11: python.d INFO: mysql: tcpipv6_root: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: mysql: mycnf1_netdata: MySQLdb or PyMySQL module is needed to use mysql.chart.py plugin
2019-01-23 15:47:11: python.d INFO: mysql: mycnf1_netdata: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: mysql: mycnf2_netdata: MySQLdb or PyMySQL module is needed to use mysql.chart.py plugin
2019-01-23 15:47:11: python.d INFO: mysql: mycnf2_netdata: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: mysql: socket1_netdata: MySQLdb or PyMySQL module is needed to use mysql.chart.py plugin
2019-01-23 15:47:11: python.d INFO: mysql: socket1_netdata: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: mysql: socket2_netdata: MySQLdb or PyMySQL module is needed to use mysql.chart.py plugin
2019-01-23 15:47:11: python.d INFO: mysql: socket2_netdata: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: mysql: socket3_netdata: MySQLdb or PyMySQL module is needed to use mysql.chart.py plugin
2019-01-23 15:47:11: python.d INFO: mysql: socket3_netdata: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: mysql: socket4_netdata: MySQLdb or PyMySQL module is needed to use mysql.chart.py plugin
2019-01-23 15:47:11: python.d INFO: mysql: socket4_netdata: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: mysql: tcp_netdata: MySQLdb or PyMySQL module is needed to use mysql.chart.py plugin
2019-01-23 15:47:11: python.d INFO: mysql: tcp_netdata: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: mysql: tcpipv4_netdata: MySQLdb or PyMySQL module is needed to use mysql.chart.py plugin
2019-01-23 15:47:11: python.d INFO: mysql: tcpipv4_netdata: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: mysql: tcpipv6_netdata: MySQLdb or PyMySQL module is needed to use mysql.chart.py plugin
2019-01-23 15:47:11: python.d INFO: mysql: tcpipv6_netdata: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: nsd: nsd: Can't locate "nsd-control stats_noreset" binary
2019-01-23 15:47:11: python.d INFO: nsd: nsd: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: ntpd: localhost: socket to "127.0.0.1" port 123: failed to receive response: [Errno 111] Connection refused
2019-01-23 15:47:11: python.d INFO: ntpd: localhost: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: ntpd: localhost_ipv4: socket to "127.0.0.1" port 123: failed to receive response: [Errno 111] Connection refused
2019-01-23 15:47:11: python.d INFO: ntpd: localhost_ipv4: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: ntpd: localhost_ipv6: socket to "::1" port 123: failed to receive response: [Errno 111] Connection refused
2019-01-23 15:47:11: python.d INFO: ntpd: localhost_ipv6: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: ovpn_status_log: ovpn_status_log: 'log_path' is not defined
2019-01-23 15:47:11: python.d INFO: ovpn_status_log: ovpn_status_log: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: portcheck: portcheck: Host or port missing
2019-01-23 15:47:11: python.d INFO: portcheck: portcheck: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: postfix: postfix: Can't locate "postqueue -p" binary
2019-01-23 15:47:11: python.d INFO: postfix: postfix: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: postgres: socket: 'python-psycopg2' module is needed to use postgres.chart.py
2019-01-23 15:47:11: python.d INFO: postgres: socket: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: postgres: tcp: 'python-psycopg2' module is needed to use postgres.chart.py
2019-01-23 15:47:11: python.d INFO: postgres: tcp: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: postgres: tcpipv4: 'python-psycopg2' module is needed to use postgres.chart.py
2019-01-23 15:47:11: python.d INFO: postgres: tcpipv4: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: postgres: tcpipv6: 'python-psycopg2' module is needed to use postgres.chart.py
2019-01-23 15:47:11: python.d INFO: postgres: tcpipv6: check() => [FAILED]
2019-01-23 15:47:11: python.d INFO: redis: redis: check() => [OK]
2019-01-23 15:47:11: python.d ERROR: samba: samba: Can't locate 'sudo' or 'smbstatus' binary
2019-01-23 15:47:11: python.d INFO: samba: samba: check() => [FAILED]
2019-01-23 15:47:11: python.d INFO: sensors: sensors: check() => [OK]
2019-01-23 15:47:11: python.d ERROR: smartd_log: smartd_log: check() unhandled exception: [Errno 2] No such file or directory: '/var/log/smartd'
2019-01-23 15:47:11: python.d INFO: smartd_log: smartd_log: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: squid: squid: Failed to connect to "127.0.0.1", port 3128, error: [Errno 111] Connection refused
2019-01-23 15:47:11: python.d ERROR: squid: squid: invalid data received
2019-01-23 15:47:11: python.d INFO: squid: squid: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: varnish: varnish: Can't locate 'varnishstat' binary or binary is not executable by user netdata
2019-01-23 15:47:11: python.d INFO: varnish: varnish: check() => [FAILED]
2019-01-23 15:47:11: python.d INFO: web_log: nginx_log: Collected data: ['request', 'code', 'bytes_sent', 'address']
2019-01-23 15:47:11: python.d INFO: web_log: nginx_log: check() => [OK]
2019-01-23 15:47:11: python.d INFO: web_log: nginx_log2: check() => [DROPPED] (already served by another job)
2019-01-23 15:47:11: python.d ERROR: web_log: apache_log: /var/log/apache2/access.log is empty
2019-01-23 15:47:11: python.d INFO: web_log: apache_log: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: web_log: apache_log2: /var/log/apache2/access_log not readable or not exist
2019-01-23 15:47:11: python.d INFO: web_log: apache_log2: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: web_log: apache_log3: /var/log/httpd/access_log not readable or not exist
2019-01-23 15:47:11: python.d INFO: web_log: apache_log3: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: web_log: apache_vhosts_log: /var/log/apache2/other_vhosts_access.log is empty
2019-01-23 15:47:11: python.d INFO: web_log: apache_vhosts_log: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: web_log: gunicorn_log: /var/log/gunicorn/access.log not readable or not exist
2019-01-23 15:47:11: python.d INFO: web_log: gunicorn_log: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: web_log: gunicorn_log2: /var/log/gunicorn/gunicorn-access.log not readable or not exist
2019-01-23 15:47:11: python.d INFO: web_log: gunicorn_log2: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: web_log: apache_cache: /var/log/apache/cache.log not readable or not exist
2019-01-23 15:47:11: python.d INFO: web_log: apache_cache: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: web_log: apache2_cache: /var/log/apache2/cache.log not readable or not exist
2019-01-23 15:47:11: python.d INFO: web_log: apache2_cache: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: web_log: httpd_cache: /var/log/httpd/cache.log not readable or not exist
2019-01-23 15:47:11: python.d INFO: web_log: httpd_cache: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: web_log: squid_log1: /var/log/squid3/access.log not readable or not exist
2019-01-23 15:47:11: python.d INFO: web_log: squid_log1: check() => [FAILED]
2019-01-23 15:47:11: python.d ERROR: web_log: squid_log2: /var/log/squid/access.log not readable or not exist
2019-01-23 15:47:11: python.d INFO: web_log: squid_log2: check() => [FAILED]
2019-01-23 15:47:12: netdata INFO  : PLUGINSD[python.d] : File /var/cache/netdata/mongodb.locks_database/Database_w.db is too old (last collected 1548233232 seconds ago, but the database is 3996 seconds). Clearing it.
2019-01-23 15:47:12: netdata INFO  : PLUGINSD[python.d] : File /var/cache/netdata/mongodb.locks_global/Global_R.db is too old (last collected 1548233232 seconds ago, but the database is 3996 seconds). Clearing it.
2019-01-23 15:47:12: netdata INFO  : PLUGINSD[python.d] : File /var/cache/netdata/mongodb.command_total_rate/update_total.db is too old (last collected 1548233232 seconds ago, but the database is 3996 seconds). Clearing it.
2019-01-23 15:47:12: netdata INFO  : PLUGINSD[python.d] : File /var/cache/netdata/mongodb.locks_collection/Collection_R.db is too old (last collected 1548233232 seconds ago, but the database is 3996 seconds). Clearing it.
2019-01-23 15:47:12: netdata INFO  : PLUGINSD[python.d] : File /var/cache/netdata/mongodb.locks_collection/Collection_W.db is too old (last collected 1548233232 seconds ago, but the database is 3996 seconds). Clearing it.
2019-01-23 15:47:12: netdata INFO  : PLUGINSD[python.d] : File /var/cache/netdata/mongodb.locks_collection/Collection_w.db is too old (last collected 1548233232 seconds ago, but the database is 3996 seconds). Clearing it.
2019-01-23 15:47:12: netdata INFO  : PLUGINSD[python.d] : File /var/cache/netdata/mongodb.command_failed_rate/update_failed.db is too old (last collected 1548233232 seconds ago, but the database is 3996 seconds). Clearing it.
2019-01-23 15:47:22: python.d ERROR: redis: redis: chart 'redis.keys' was suppressed due to non updating
2019-01-23 15:47:22: python.d ERROR: mongodb: mongodb: chart 'mongodb.locks_metadata' was suppressed due to non updating

@ilyam8
Copy link
Member

ilyam8 commented Jan 23, 2019

It looks like this is not full output. Anyway i don't see main: module load config: 'example2'

i think you have 2 installations or something

you did

cd /usr/libexec/netdata/python.d

from the ouput i see

/usr/lib/x86_64-linux-gnu/netdata/plugins.d/python.d.plugin' running on pid 22498

x86_64-linux-gnu

@bitcoiners
Copy link
Author

bitcoiners commented Jan 23, 2019

Ok. How do I uninstall this one?
/usr/libexec/netdata/python.d

I have netdata .deb installed and may have another installation from install script.

@ilyam8
Copy link
Member

ilyam8 commented Jan 23, 2019

I have netdata .deb

where did you get it?

@bitcoiners
Copy link
Author

sudo apt install netdata

@ilyam8
Copy link
Member

ilyam8 commented Jan 23, 2019

Ok, remove it via apt. I think you got what the problem is.

@bitcoiners
Copy link
Author

bitcoiners commented Jan 23, 2019

ok. looks like I got it to work :)
Thank you!
Now onto developing my new plugin..

@cakrit cakrit moved this from Triage to Done in Documentation May 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Documentation
  
Done
Development

No branches or pull requests

3 participants