PagerDuty notification Integration

MonGuru’s Nagios now has notification commands that integrates with PagerDuty.

Bellow is reproduced the PagerDuty’s guide to get started:

If you don’t already have a PagerDuty “Nagios” service, you should create one:

  1. In your account, under the Services tab, click Add New Service.
    SL-AddNewServiceButton
  2. Enter a Service Name, choose an Escalation Policy. Start typing “Nagios” under Integration Type to filter your choices.
     Add a new PagerDuty Nagios service
  3. Click the Add Service button.
  4. Once the service is created, you’ll be taken to the service page. On this page, you’ll see the Service API key, which will be needed when you configure your Nagios server to send events to PagerDuty.
  5. PagerDuty Nagios service key

 

As PagerDuty is already configuured on MonGuru, you just need to configure your contacts definitions.

define contact {
       contact_name                             pagerduty
       alias                                    PagerDuty Pseudo-Contact
       service_notification_period              24x7
       host_notification_period                 24x7
       service_notification_options             w,u,c,r
       host_notification_options                d,r
       service_notification_commands            notify-service-by-pagerduty
       host_notification_commands               notify-host-by-pagerduty
       pager                                    YOUR-SERVICE-KEY-HERE
}

Now you can use thecontact name “pagerduty” in one existing contact group by adding it to the contact group as seen bellow:

define contactgroup {
       contactgroup_name                        instance_owners
       alias                                    Nagios Administrators
       members                                  instance_owner, pagerduty
}

 

 

 

Easy Way to Start Monitoring Cloud Servers

TL;DR – Start monitoring your server using MonGuru Cloud Hosted Nagios.

What you will need:
-Debian 6+ or Ubuntu 12.04+ or CentOS 6+.
-Root access
-A MonGuru account
-Open SNMP (udp port 161) on firewall
-ICMP echo reply on firewall (type 0)

If you have all the ingredients all that you need to do is to type on your servers the following command line:

curl -sL https://mongu.ru/configuration_scripts/add_new_server.sh | sudo bash

Follow the script instructions.

===

Nowadays it’s common a developer own a cloud based system. Or at least
one cloud based server or a VPS (linode, aws, digital ocean…). Also they are used to profile their applications with tools like NewRelic.

What it’s not common to see is developers that have some kind of
alerting system if their server or application is running out of
resources like disk, cpu, memory, etc.

Without discussion today Nagios is the most famous alerting system. But
setting it up can be a little painful, especially to developers that not
necessarily want to learn how to configure it.

If you are one of these guys, MonGuru created a really simple script that will
detect some services on your server, and add it to a MonGuru cloud
hosted Nagios instance.

You will need:
-Debian 6+ or Ubuntu 12.04+ or CentOS 6+.
-Root access
-A MonGuru account
-Open SNMP (udp port 161) on firewall
-ICMP echo reply on firewall (type 0)

If you have all the ingredients all that you need to do is to type on your servers the following command line:

curl -sL https://mongu.ru/configuration_scripts/add_new_server.sh | sudo bash

After that, you can follow the URL informed by the script to see the
Nagios instance collecting data from your system. It will send to you
e-mail alerts when something goes critical.

If you know Nagios, will feel confortable downloading and editing the
configuration on your dashboard.

We tested this on CentOS, Debian and Ubuntu, it uses apt-get or yum, so it will not work
on other Linux distributions.

Here is what it does:

-Installs snmpd.
-Generates a random pair of snmp login/password.
-Backup the existing snmpd configuration.
-Download a pre-configured snmpd.conf file.
-Creates a snmp login/password using the random pair created before.
-Download a python script to detect you server’s services and configuration
-Authenticates you on https://mongu.ru
-Creates a Nagios instance if it don’t exists yet.
-Adds your server to the Nagios instance.