Skip to main content

Hello,
i need to install “postfix” but the official guide (for the same version as mine) doesn't work:

Configuring your Centreon to send emails | Centreon Documentation

First step:

apt install mailx cyrus-sasl-plain

E: Package 'mailx' has no installation candidate
E: Unable to locate package cyrus-sasl-plain

Hmm, so I try to install only mailx:

apt install mailx 

Package mailx is a virtual package provided by:
  mailutils 1:3.15-4
  bsd-mailx 8.1.2-0.20220412cvs-1
You should explicitly select one to install.

So, I install “mailutils”:

apt install mailutils

Installed, but postfix service doesnot exists.

sudo postfix status
sudo: postfix: command not found

If I try install cyrus-sasl-postfix again:

apt install cyrus-sasl-plain

E: Unable to locate package cyrus-sasl-plain

Why the official guide do not working? Am I doing something wrong?

👋@Martin-05 

 

apt install postfix bsd-mailx

I believe the doc team is looking into it.

 

😁💃📝


is postfix installed ? 


👋@Martin-05 

 

apt install postfix bsd-mailx

I believe the doc team is looking into it.

 

😁💃📝

This works, thank you!

Postfix is now installed and sending test message works (echo "Test Postfix" | mail -s "subject" -a "From:centreon-PV" mymail@something.cz).

sudo service postfix status

● postfix.service - Postfix Mail Transport Agent
     Loaded: loaded (/lib/systemd/system/postfix.service; enabled; preset: enab>
     Active: active (exited) since Tue 2024-12-17 12:48:58 CET; 2min 47s ago
       Docs: man:postfix(1)
    Process: 1022 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
   Main PID: 1022 (code=exited, status=0/SUCCESS)
        CPU: 3ms

...but Centreon still shows that the service is not running:

Where could the problem be?


what is the command in centreon ? 

do you have done a ps in the linux server ?


Command:

/usr/lib/centreon/plugins//centreon_linux_snmp.pl --plugin=os::linux::snmp::plugin --mode=processcount --hostname=localhost --snmp-version='2c' --snmp-community='public'  --process-name='master' --process-path='/usr/lib/postfix/sbin/master' --process-args='' --regexp-name --regexp-path --regexp-args --warning='' --critical='1:' 

CRITICAL: Number of current processes running: 0 | 'nbproc'=0;;1:;0;
 

Settings “proc-postfix” contains 
PROCESSPATH = /usr/libexec/postfix/master

but command “ps -ef” shows “/usr/lib/postfix/sbin/master”.

Change PROCESSPATH to “/usr/lib/postfix/sbin/master” do not affect the result.

I think the whole opensource Centreon appliance version 24.10 for VMWare is kind of weird, this version is not available for download now (it was a two weeks ago).

 


Maybe using

process-path='/usr/lib/postfix/sbin/' 

(not

process-path='/usr/lib/postfix/sbin/master'

)


Maybe using

process-path='/usr/lib/postfix/sbin/' 

(not

process-path='/usr/lib/postfix/sbin/master'

)

Oh, sure….. I changed it but the result is the same.
 

Check command:

/usr/lib/centreon/plugins//centreon_linux_snmp.pl --plugin=os::linux::snmp::plugin --mode=processcount --hostname=localhost --snmp-version='2c' --snmp-community='public'  --process-name='master' --process-path='/usr/lib/postfix/sbin/' --process-args='' --regexp-name --regexp-path --regexp-args --warning='' --critical='1:1'

CRITICAL: Number of current processes running: 0 | 'nbproc'=0;;1:1;0;
 


try --debug and snmpwalk to .1.3.6.1.2.1.25.4.2.1

or around there? 

https://github.com/centreon/centreon-plugins/blob/develop/src/snmp_standard/mode/processcount.pm#L130

 

 


try --debug and snmpwalk to .1.3.6.1.2.1.25.4.2.1

or around there? 

https://github.com/centreon/centreon-plugins/blob/develop/src/snmp_standard/mode/processcount.pm#L130

Adding --debug to the check command didn't show anything extra.

I'm sorry, but I don't know what to change where. Change this in file snmpd.conf?

 

# Views
#   arguments viewname included eoid]

#  system + hrSystem groups only
view centreon included .1.3.6.1
view   systemonly  included   .1.3.6.1.2.1.1
view   systemonly  included   .1.3.6.1.2.1.25.1
view   all  included   .1
view   mib  included   .1.3.6.1.2.1

 


@Martin-05 

in your snmpd.conf try with (don't forget to restart snmp):

 

view   centreon    included   .1.3.6.1
view systemonly included .1.3.6.1.2.1
view systemonly included .1.3.6.1.2.1.25
view systemonly included .1.3.6.1.4.1.2021

systemctl status snmpd
systemctl restart snmpd
systemctl status snmpd

Adjust as needed. test with the snmpwalk

 

 snmpwalk -c kcommunity] -v 2c .1.3.6.1.2.1.25.4.2.1 .ip of the host]

@Martin-05 

in your snmpd.conf try with (don't forget to restart snmp):

 

view   centreon    included   .1.3.6.1
view systemonly included .1.3.6.1.2.1
view systemonly included .1.3.6.1.2.1.25
view systemonly included .1.3.6.1.4.1.2021

systemctl status snmpd
systemctl restart snmpd
systemctl status snmpd

Adjust as needed. test with the snmpwalk

 

 snmpwalk -c kcommunity] -v 2c .1.3.6.1.2.1.25.4.2.1 .ip of the host]


I changed the configuration snmpd.conf to this:

view centreon included .1.3.6.1
view   systemonly  included   .1.3.6.1.2.1.1
view   systemonly  included   .1.3.6.1.2.1.25.1
view   systemonly  included   .1.3.6.1.4.1.2021
view   systemonly  included   .1.3.6.1.2.1.25.4.2.1

After restarting the service snmpd the "proc-Postfix" is in "OK" state!
Thank you very much!
Also most other centreon-central services are no longer "critical" but "OK".
This solved most of this post:

Centreon-central services error | Community


Reply