cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure PEM to send SNMP traps on alerts

EnterpriseDB Postgres Enterprise Manager (PEM) provides functionality to send SNMP traps for integration into an upstream monitoring system.This how-to demonstrates a basic interface between PEM and SNMP, and assumes basic familiarity with SNMP. This document will cover three main topics:

  1. How to generate the PEM Management Information Base (MIB)
  2. How to configure PEM to send traps
  3. How to configure individual SNMP alerts

Generate the PEM MIB

The query psql -U postgres -d pem -A -t -c "SELECT pem.generate_alert_mib();" > /path/to/mibs/PEM-ALERTING-MIB.mib provides the structure and varbinds for the traps that PEM will send. A copy of the MIB may need to be installed on the trap receiver host. The MIB needs to be regenerated after new custom probes or custom alerts are created, so that the new OIDs are included.

Note: For those using Net-SNMP, check the documentation to determine where the MIB belongs.

Configure PEM to send the traps to the trap receiver

  • The following information about the trap receiver is required for configuration:
    • IP address of the receiver
    • community string
    • port
  • Select Management -> Server Configuration… in the top menu bar

          Screen Shot 2019-04-26 at 16.08.52.png

  • Scroll down to the bottom to the SNMP parameters.
    • snmp_enabled: this should be set to True
    • snmp_server: the default is 127.0.0.1. Change this to the IP address of the trap receiver.
    • snmp_community: the default is public. If necessary, change this to the community string the trap receiver expects.
    • snmp_port: the default is 162. If necessary, change this to the port number the trap receiver expects. Be aware of firewall rules that may not allow traffic on this port.
    • snmp_spool_retention_time: the default is 7 and usually does not need to be changed.

Configure SNMP alerts in PEM

From the PEM GUI, select the desired node for alerting (server, database, etc)

  • Right-click on the node and select Management->Manage Alerts…

          Screen Shot 2019-04-26 at 16.11.03.png

  • Click the Edit icon on the left of the desired alert
  • In the resulting panel, click the Notification tab
  • Click to turn on the Send Trap slider under Trap Notification and choose the appropriate version (usually v2)

          Screen Shot 2019-04-26 at 16.20.19.png

When PEM encounters an alertable situation, the trap receiver should now receive an event, which can verified with a packet sniffer.

Version history
Revision #:
2 of 2
Last update:
‎04-26-2019 07:44 PM
Updated by:
 
Labels (1)
Contributors
Comments

Hi Amit,

Is PEM a MUST to be able to raise/clear SNMP traps or can EPAS do that? PEM requires some cpu cores and memory and hence, for a standalone EPAS DB server, having to install something like PEM is quite resource intensive and hence this question.

 

Thanks

PEM has this ability to raise the SNMP traps, but if you dont want to go for it, you can use any other method of monitoring which can support this functionality. The whole thought is to monitor the PPAS server so you should not use it to monitor itself, I believe that defeats the purpose.

Agreed. The point was if there is something lesser resource intensive than a full fledged PEM server (say something like an agent) to be able to do it. As I mentioned, reason being, to install a full fledged PEM server to monitor a single EPAS seems like an overkill.

 

Thanks

The least resource intensive thing would be to write scripts and run them as cron jobs. This should do good for very basic monitoring and you can use the OS level capabilites for generating traps or emails, whichever you prefer.

We were able to generate the MIB successfully but when we try to install it on a Zabbix server, it fails with errors. What could be the reason?

 

Thanks

Hi Pcpg,

 

kindly share what errors you are getting. And the procedure you are following.

 

Regards,

Dhananjay