Netdata Community

Feature request: Monitor opensmtpd

Following issue Opensmtpd monitoring · Issue #4883 · netdata/netdata · GitHub this thread is to track the info needed by the netdata devs to monitor opensmtpd if there is enough interest

Hi, @ScrumpyJack. Thanks for joining our community :wave:


About OpenSMTPD, I see that there are 2 ways of gathering metrics from it:

  • easy way: using smtpctl tool. We just need to exec it.
  • hard way: check smtpctl source code. Likely it connects to some socket and sends some command. We can do the same. Perhaps that can be found in the documentation/internet. We need to check that.

@ScrumpyJack suggestion is using:

  • smtpctl show stats
stats sample
>time smtpctl show stats
bounce.envelope=0
bounce.message=0
bounce.session=0
control.session=1
mda.envelope=0
mda.pending=0
mda.running=0
mda.user=0
mta.connector=0
mta.domain=0
mta.envelope=0
mta.host=0
mta.relay=0
mta.route=0
mta.session=0
mta.source=0
mta.task=0
mta.task.running=0
queue.bounce=14
queue.evpcache.load.hit=8286
queue.evpcache.size=0
queue.evpcache.update.hit=1
scheduler.delivery.ok=4132
scheduler.delivery.permfail=12
scheduler.delivery.tempfail=1
scheduler.envelope=0
scheduler.envelope.expired=2
scheduler.envelope.incoming=0
scheduler.envelope.inflight=0
scheduler.ramqueue.envelope=0
scheduler.ramqueue.message=0
scheduler.ramqueue.update=0
smtp.session=0
smtp.session.inet4=41063
smtp.session.inet6=2
smtp.session.local=103
smtp.tls=0
uptime=3889929
uptime.human=45d32m9s
smtpctl show stats  0.01s user 0.01s system 70% cpu 0.024 total
  • time smtpctl show status
status sample
> time smtpctl show status
MDA running
MTA running
SMTP running
smtpctl show status  0.00s user 0.00s system 69% cpu 0.010 total

In any case, we need to get some understanding of the metrics to group them properly/add some alerts.

@ScrumpyJack

  • you suggested metrics to alerts on :+1:

alerting on
scheduler.delivery.permfail
scheduler.envelope.expired
bounce.*

  • As for the charts you said graphs grouping should come naturally.

Well, let’s say they don’t for me :grinning_face_with_smiling_eyes: Could you provide the grouping that makes sense for you?