Netdata Community

Charts from oracledb collector not showing

Problem/Question

I am pretty new to netdata :slight_smile:
a) how do I get the charts from the oracledb collector to show
b) how can I get the collector to use python3 not python2? Both flavours are installed, at the command prompt ‘python’ brings up the system default python2.7.5 while ‘python3’ brings up python 3.6.8

Environment/Browser

OracleLinux7.6(==Redhat/Centos), Chrome browser, cx_Oracle installed in both python2.7.5 and python3.6.8

What I expected to happen

I expected some charts to appear once this plugin was working. I believe the plugin itself is probably functional it is because the netdata collector now starts without errors after installing cx_Oracle and some libraries running the debug command I found “/usr/libexec/netdata/plugins.d/python.d.plugin oracledb debug trace” I get output like this continuously scrolling:
BEGIN oracledb_local.tablespace_size 4000735
SET ‘APEX_tablespace_size’ = 1073741824000
SET ‘APEX_3639508696174651_tablespace_size’ = 104923136000
SET ‘APEX_FILES_tablespace_size’ = 209715200000
SET ‘AUDIT_DATA_tablespace_size’ = 34359721984000
SET ‘FORMS_APEX_POC_DATA_tablespace_size’ = 34359721984000
SET ‘NHBC_COMMON_DATA_tablespace_size’ = 34359721984000
SET ‘SYSAUX_tablespace_size’ = 34359721984000
SET ‘SYSTEM_tablespace_size’ = 34359721984000
SET ‘TEMP_tablespace_size’ = 34359721984000
SET ‘UMNT_DATA_tablespace_size’ = 34359721984000
SET ‘UNDOTBS1_tablespace_size’ = 34359721984000
SET ‘USERS_tablespace_size’ = 34359721984000
END

BEGIN oracledb_local.physical_disk_read_write 4000735
SET ‘physical_reads_per_sec’ = 25373533
SET ‘physical_writes_per_sec’ = 0
END

BEGIN oracledb_local.activity 4000735
SET ‘activity_parse_count_total’ = 19606770000
SET ‘activity_execute_count’ = 59616973000
SET ‘activity_user_commits’ = 362772000
SET ‘activity_user_rollbacks’ = 21743000
END

BEGIN netdata.runtime_oracledb_local 4000735
SET run_time = 3454
END

Hi, @gwingnhbc.

I see the following:

  • it works when running the plugin manually as root (?) user
  • it doesn’t work when Netdata is running as a systemd service.

Let’s check the logs:

# as root user
systemctl restart netdata.service
# wait a bit
grep oracledb /var/log/netdata/error.log

how can I get the collector to use python3 not python2

  • find [plugin:python.d] section in the netdata.conf (/etc/netdata/netdata.conf)
  • uncomment command options and set it to -ppython3

e.g.:

[plugin:python.d]
	# update every = 1
	command options = -ppython3

Thanks for the really helpful replies Ilyam. I implemented those two suggestions and it started working with graphs appearing as well - I’m pleased to have the python3 in use as it allows me to use the later/current cx_oracle versions.

The netdata.conf file did not have a [plugin:python.d] section at all so I just added one as per your text above. Would that have been the problem? Do plugins normally register themselves or do they always have to be manually entered in the main conf file?

It is supposed to have [plugin:NAME] for every plugin (all files with .plugin suffix in the plugins.d/ dir), and, optionally, its modules.

An example from my server
[ilyam@pc netdata]$ grep -E "\[plugin:.+" netdata.conf
[plugin:proc]
[plugin:proc:diskspace]
[plugin:timex]
[plugin:ebpf]
[plugin:apps]
[plugin:go.d]
[plugin:python.d]
[plugin:fping]
[plugin:cups]
[plugin:ioping]
[plugin:charts.d]
[plugin:perf]
[plugin:node.d]
[plugin:idlejitter]
[plugin:cgroups]
[plugin:tc]
[plugin:proc:/proc/stat]
[plugin:proc:diskspace:/]
[plugin:proc:/proc/uptime]
[plugin:proc:/proc/loadavg]
[plugin:proc:/proc/sys/kernel/random/entropy_avail]
[plugin:proc:/proc/pressure]
[plugin:proc:/proc/interrupts]
[plugin:proc:/proc/softirqs]
[plugin:proc:/proc/vmstat]
[plugin:proc:/sys/devices/system/node]
[plugin:proc:/proc/meminfo]
[plugin:proc:/sys/kernel/mm/ksm]
[plugin:proc:/sys/devices/system/edac/mc]
[plugin:proc:/proc/net/dev]
[plugin:proc:/proc/net/dev:lo]
[plugin:proc:/proc/net/dev:eno1]
[plugin:proc:/proc/net/dev:wlp5s0]
[plugin:proc:/proc/net/dev:br-68517cf2dc64]
[plugin:proc:/proc/net/dev:br-7eb1dc4e259e]
[plugin:proc:/proc/net/dev:docker0]
[plugin:proc:/proc/net/wireless]
[plugin:proc:/proc/net/sockstat]
[plugin:proc:/proc/net/sockstat6]
[plugin:proc:/proc/net/netstat]
[plugin:proc:/proc/net/snmp]
[plugin:proc:/proc/net/snmp6]
[plugin:proc:/proc/net/sctp/snmp]
[plugin:proc:/proc/net/softnet_stat]
[plugin:proc:/proc/net/ip_vs_stats]
[plugin:proc:/sys/class/infiniband]
[plugin:proc:/proc/net/stat/nf_conntrack]
[plugin:proc:/proc/sys/net/netfilter/nf_conntrack_max]
[plugin:proc:diskspace:/dev]
[plugin:proc:diskspace:/dev/shm]
[plugin:proc:diskspace:/dev/hugepages]
[plugin:proc:diskspace:/sys/firmware/efi/efivars]
[plugin:proc:diskspace:/sys/kernel/security]
[plugin:proc:diskspace:/sys/fs/cgroup]
[plugin:proc:diskspace:/sys/fs/cgroup/unified]
[plugin:proc:diskspace:/sys/fs/cgroup/systemd]
[plugin:proc:diskspace:/sys/fs/cgroup/freezer]
[plugin:proc:diskspace:/sys/fs/cgroup/blkio]
[plugin:proc:diskspace:/sys/fs/cgroup/hugetlb]
[plugin:proc:diskspace:/sys/fs/cgroup/cpuset]
[plugin:proc:diskspace:/sys/fs/cgroup/net_cls,net_prio]
[plugin:proc:diskspace:/sys/fs/cgroup/cpu,cpuacct]
[plugin:proc:diskspace:/sys/fs/cgroup/pids]
[plugin:proc:diskspace:/sys/fs/cgroup/devices]
[plugin:proc:diskspace:/sys/fs/cgroup/rdma]
[plugin:proc:diskspace:/sys/fs/cgroup/perf_event]
[plugin:proc:diskspace:/sys/fs/cgroup/memory]
[plugin:proc:diskspace:/sys/fs/pstore]
[plugin:proc:diskspace:/sys/fs/bpf]
[plugin:proc:diskspace:/sys/kernel/tracing]
[plugin:proc:diskspace:/sys/kernel/config]
[plugin:proc:diskspace:/run]
[plugin:proc:diskspace:/run/user/1000]
[plugin:proc:diskspace:/run/user/1000/gvfs]
[plugin:proc:diskspace:/tmp]
[plugin:proc:diskspace:/boot/efi]
[plugin:proc:diskspace:/boot]
[plugin:proc:diskspace:/etc]
[plugin:proc:diskspace:/home]
[plugin:proc:diskspace:/root]
[plugin:proc:diskspace:/run/credentials]
[plugin:proc:diskspace:/run/netdata]
[plugin:proc:diskspace:/run/systemd/incoming]
[plugin:proc:diskspace:/run/user]
[plugin:proc:diskspace:/usr]
[plugin:proc:diskspace:/sys/kernel/debug/tracing]
[plugin:proc:/proc/net/stat/synproxy]
[plugin:proc:/proc/diskstats]
[plugin:proc:/proc/diskstats:nvme0n1]
[plugin:proc:/proc/diskstats:nvme0n1p1]
[plugin:proc:/proc/diskstats:nvme0n1p2]
[plugin:proc:/proc/diskstats:loop0]
[plugin:proc:/proc/mdstat]
[plugin:proc:/proc/net/rpc/nfsd]
[plugin:proc:/proc/net/rpc/nfs]
[plugin:proc:/proc/spl/kstat/zfs/arcstats]
[plugin:proc:/proc/spl/kstat/zfs]
[plugin:proc:/sys/fs/btrfs]
[plugin:proc:ipc]
[plugin:proc:/sys/class/power_supply]

Thanks. The netdata.conf from my epel based install is very different from your example. It is out of the box very empty with only global,web and health sections in it so it is a very short file but I have added a plugin section just holding the pythod.d entry as you advised and that does work. Thanks again.

You can download it with the following command (assuming netdata service is running):

wget -O /etc/netdata/netdata.conf http://localhost:19999/netdata.conf