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

Adds postfix monitoring for specific queues. #867

Closed
wants to merge 1 commit into from

Conversation

FarhadF
Copy link

@FarhadF FarhadF commented Aug 31, 2016

This PR will add a new chart in postfix queues section, monitoring 4 postfix queues stated below.

  • Incoming
  • Active
  • Deferred
  • Bounced

This requires "netdata" to run with root privileges.

@paulfantom
Copy link
Contributor

paulfantom commented Aug 31, 2016

@FarhadF ok, so now when I see whole code, we can do some optimizations.

First of all we need to get rid of run as root situation. Can you test if running command /usr/sbin/postconf as normal user gives you some output (on CentOS 7 it does)?

Secondly, since you are not using postqueue but postconf, this module needs custom check() method to find if postconf is available on this system.

At last I think you should split _get_data to use one method per command, same way it is done in ipfs.chart.py for getting data from many urls.

@FarhadF
Copy link
Author

FarhadF commented Sep 1, 2016

First of all we need to get rid of run as root situation. Can you test if running command /usr/sbin/postconf as normal user gives you some output (on CentOS 7 it does)?

I'm on Debian jessie with final updates (8.5), postfix 2.11.3 and it works for normal users but you have to specify the full path.
I'm gonna find files in postfix queues directories and thats where I need the root access, look at active, deferred, incoming and bounced directories. owners and permissions in image below are all postfix defaults.
image

@FarhadF
Copy link
Author

FarhadF commented Sep 4, 2016

At last I think you should split _get_data to use one method per command, same way it is done in ipfs.chart.py for getting data from many urls.

@paulfantom awesome example, now I know how to fix it.

Secondly, since you are not using postqueue but postconf, this module needs custom check() method to find if postconf is available on this system.

Can you explain more on this one? I found a check function in ExecutableService Class in base.py but I don't know how to fix it, and I guess I need to add my commands into postfix.conf but it only has a command variable.

@paulfantom
Copy link
Contributor

About custom check() method, look at tomcat.chart.py

@ktsaou
Copy link
Member

ktsaou commented Jun 11, 2017

@l2isbad please review this one too.

@ktsaou ktsaou requested a review from ilyam8 June 11, 2017 16:12
@ilyam8
Copy link
Member

ilyam8 commented Jun 11, 2017

well, this one 'requires "netdata" to run with root privileges'.

@ilyam8
Copy link
Member

ilyam8 commented Jun 11, 2017

Another problem is that this PR adds 5 more Popen calls.
But since 'root privileges' is required there is nothing to review.

@ktsaou
Copy link
Member

ktsaou commented Jun 11, 2017

requires "netdata" to run with root privileges'.

yes, you are right. This is a breaking issue.

@FarhadF I am closing this. I am very sorry, but we cannot merge it.

@ktsaou ktsaou closed this Jun 11, 2017
vkalintiris pushed a commit to vkalintiris/netdata that referenced this pull request Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants