Populating My Dashboard with MegaCLI Info

It still doesn’t show, but here is from the log:
2021-02-02 19:08:53: python.d INFO: plugin[main] : [megacli] built 1 job(s) configs
2021-02-02 19:08:54: python.d ERROR: megacli[megacli] : sudo: a password is required
2021-02-02 19:08:54: python.d INFO: plugin[main] : megacli[megacli] : check failed

Following up on this.

It worked in the debug mode. Did you switch to netdata user?

netdata@host:~$ sudo systemctl start netdata.service

error.log output:
2021-02-07 18:15:56: python.d INFO: plugin[main] : [megacli] built 1 job(s) configs
2021-02-07 18:15:56: python.d ERROR: megacli[megacli] : sudo: a password is required
2021-02-07 18:15:56: python.d INFO: plugin[main] : megacli[megacli] : check failed

Yeah, i see that line

When you run it in the debug mode

Did you do it as root or netdata user?

Yes:
netdata@server:/usr/libexec/netdata/plugins.d$ ./python.d.plugin debug megacli
2021-02-08 07:06:22: python.d INFO: plugin[main] : using python v2
2021-02-08 07:06:22: python.d DEBUG: plugin[main] : looking for ‘python.d.conf’ in [‘/etc/netdata’, ‘/usr/lib/netdata/conf.d’]
2021-02-08 07:06:22: python.d DEBUG: plugin[main] : loading ‘/usr/lib/netdata/conf.d/python.d.conf’
2021-02-08 07:06:22: python.d DEBUG: plugin[main] : ‘/usr/lib/netdata/conf.d/python.d.conf’ is loaded
2021-02-08 07:06:22: python.d DEBUG: plugin[main] : looking for ‘pythond-jobs-statuses.json’ in /var/lib/netdata
2021-02-08 07:06:22: python.d DEBUG: plugin[main] : loading ‘/var/lib/netdata/pythond-jobs-statuses.json’
2021-02-08 07:06:22: python.d DEBUG: plugin[main] : ‘/var/lib/netdata/pythond-jobs-statuses.json’ is loaded
2021-02-08 07:06:22: python.d DEBUG: plugin[main] : [megacli] looking for ‘megacli.conf’ in [‘/etc/netdata/python.d’, ‘/usr/lib/netdata/conf.d/python.d’]
2021-02-08 07:06:22: python.d DEBUG: plugin[main] : [megacli] loading ‘/usr/lib/netdata/conf.d/python.d/megacli.conf’
2021-02-08 07:06:22: python.d DEBUG: plugin[main] : [megacli] ‘/usr/lib/netdata/conf.d/python.d/megacli.conf’ is loaded
2021-02-08 07:06:22: python.d INFO: plugin[main] : [megacli] built 1 job(s) configs
2021-02-08 07:06:22: python.d DEBUG: megacli[megacli] : Executing command ‘/usr/bin/sudo -n -l’
2021-02-08 07:06:22: python.d ERROR: megacli[megacli] : sudo: a password is required

2021-02-08 07:06:22: python.d INFO: plugin[main] : megacli[megacli] : check failed
2021-02-08 07:06:22: python.d INFO: plugin[main] : no jobs to serve
2021-02-08 07:06:22: python.d INFO: plugin[main] : exiting from main…

could you show the following line from the /etc/sudoers?

netdata ALL=(root) NOPASSWD: /path/to/megacli

OK, I had to update that file, as that was not in there. Restarted the service as netdata, and notice this:
2021-02-08 09:51:41: python.d INFO: plugin[main] : [megacli] is disabled by default, skipping it

I am not sure why this is popping up again, as I’ve already enabled it… is there something that could be resetting this file/value? Should I just enable it again, and then restart the service?

Could be the stock file, it is being overwritten on every update.

You need to copy python.d.conf to the /etc/netdata and modify it.

There is edit-config helper script in the /etc/netdata

cd /etc/netdata
sudo ./edit-config python.d.conf

Great, it looks like it is working now, thank you! :slight_smile: