AppBeat Blog

Perfect Monitoring for Your Cloud

AppBeat web app can now run on Linux!

We have successfully migrated our web application from .NET Core RC1 to .NET Core RC2 and published it on test Linux instance (CentOS). Best of all: AppBeat binaries are 100% identical to those on Windows (same cross platform codebase!) and were simply copied to Linux... And it works! It works great!

Here are some setup details for those who are interested.

First, you have to install .NET Core runtime by following simple instructions on Microsoft .NET Core website.

ASP.NET Core web applications are running on lightweight web server called Kestrel, but since it lacks some of important web server features (for example HTTPS, various built-in tools, ...) it is usually configured to run in tandem with other web server of your choice. On Windows this is IIS, on CentOS we selected NGINX. Those web servers then forward your request to Kestrel which runs your ASP.NET Core web application, creates output and returns it back to main web server.

To setup NGINX to forward requests to Kestrel you have to edit nginx.conf with following (adapt if needed):

location / 
{
proxy_pass http://127.0.0.1:5000;
proxy_set_header Connection "";
proxy_set_header Host $host;
proxy_set_header X-Original-Proto $scheme;
proxy_set_header X-Original-For $remote_addr;
proxy_http_version 1.1;
}

Then we installed supervisor to monitor our Kestrel process and make sure it is always running:
sudo yum install supervisor

We created kestrel_default.ini file in /etc/supervisord.d/kestrel_default.ini with following content:

[program:kestrel_default]
command=dotnet /usr/share/nginx/WebApp/AppBeat.Web.dll
directory=/usr/share/nginx/WebApp
autorestart=true
autostart=true
stdout_logfile=/var/log/AppBeat/app_std_out.log
stderr_logfile=/var/log/AppBeat/app_err.log

After you saved file you can start Kestrel process by typing:

sudo supervisorctl start kestrel_default

Make sure nginx and supervisor are started on system boot:

sudo systemctl enable nginx
sudo systemctl enable supervisord

This is pretty much it :) We are now prepared for future! If you have questions you can reach us on @AppBeatMonitor

AppBeat Incidents

To make everything fully transparent we have added "Incidents" section into our Help module. Here you can find all AppBeat operation issues that were detected, with detailed description what went wrong, how service was affected and how could we prevent similar issue in future.

Monitor websites with ease

If your technical support is using AppBeat Live status screen to monitor current performance and availability of your systems, we have new useful feature for you.

You can now enable sound alarm which is automatically triggered when "Live status" icon turns red. This additionally minimizes chance for missed alarms (other notifications, such as Slack, PagerDuty, email, SMS are of course also dispatched as configured).

You can enable / disable this feature by clicking bell icon as shown below:

Before relying on this functionality please click "sound test" link to see if your web browser supports Audio API. Most modern browsers should support this feature out of the box. If everything works you should hear test alarm for approximately 15 seconds.

Would you like to see this feature in action? Sign up for free account and try it yourself!

Integration with PagerDuty - The Incident Resolution Platform

Today we published AppBeat 1.3.0 which implements support for third-party notification providers (from Account / Integrations). We are also happy to announce that first provider to be implemented in AppBeat is PagerDuty (available to all users, even those on Free Plan).

You can add PagerDuty to your AppBeat account by following these easy steps:

  • click "Account / Integrations":

  • click on "PagerDuty" button to add new notification channel (you can add multiple PagerDuty notification types; ServiceKey can be obtained on your PagerDuty website):

  • once you have tested and added your PagerDuty notification please click on "Services & Checks". Now double-click on desired service and click "Notification types" tab. Select your PagerDuty notification:

Congratulations! You have successfully integrated your PagerDuty service! From now on, when your service fails, you will automatically receive incident report directly to your PagerDuty!

We will soon add support for more third party incident management tools. Stay tuned!

How to develop PagerDuty support in C#

We are currently working on version of AppBeat which will have support for PagerDuty (third party incident management tool).

Their API is very easy to use. Here is code example from AppBeat which sends PagerDuty notifications:

namespace AppBeat.Core.Notifications
{
    class PagerDuty
    {
        //NOTE: this is dispatched in separate thread, exception handling is done by NotificationManager
        public static bool Send(ThirdPartyDispatcher.CustomNotification notification)
        {
            var settings = (Types.CustomNotificationPagerDuty)notification.Settings;

            if (string.IsNullOrWhiteSpace(settings.ServiceKey))
            {
                throw new Exception("ServiceKey is required!");
            }

            string incidentKey = Guid.NewGuid().Normalize();

            var req = new PagerDutyReq()
            {
                service_key = settings.ServiceKey,
                description = notification.ShortMessage,
                incident_key = incidentKey,
                details = new { Message = notification?.Details?.Output?.Details },
                event_type = "trigger",
                client = "AppBeat",
                client_url = "https://appbeat.io"
            };

            using (var wc = new WebClient())
            {
                var res = JsonConvert.DeserializeObject<PagerDutyRes>(wc.UploadString("https://events.pagerduty.com/generic/2010-04-15/create_event.json", JsonConvert.SerializeObject(req)));
                return res.IsOk();
            }
        }

        class PagerDutyReq
        {
            public string service_key
            {
                get; set;
            }

            public string event_type
            {
                get; set;
            }

            public string incident_key
            {
                get; set;
            }

            public string description
            {
                get; set;
            }

            public string client
            {
                get; set;
            }

            public string client_url
            {
                get; set;
            }

            public object details
            {
                get; set;
            }
        }

        class PagerDutyRes
        {
            public string status
            {
                get; set;
            }

            public string message
            {
                get; set;
            }

            public string incident_key
            {
                get; set;
            }

            public bool IsOk()
            {
                return string.Compare(status, "success", StringComparison.InvariantCultureIgnoreCase) == 0;
            }
        }
    }
}

To use this code you must first create service on PagerDuty with API integration. You then receive unique service key which you use in your API. It can't be more simple than this :)

Preview version of transaction website monitoring (feedback needed)

Today we published first public preview version of transaction monitoring and it is available from "Automated Web Testing" module. Similar feature is also offered by Ghost Inspector and Pingdom.

Please note that this AppBeat functionality is not yet complete (you can't currently save tests or schedule periodic monitoring). If you don't have AppBeat account you can sign up here for free.

Main goal of this preview is to present you our Test Editor, where you can write your own testing scripts. We would like to make sure that current version of script works with majority of websites. If you find any issue or think script is not working as it should, please contact us.

When you go to test editor there should be example script, which tries to login to our web app without password and checks if correct error is displayed:

open 'https://my.appbeat.io/manage'
assign '#loginUsername' 'FOO'
click '#btnLogin'
--ensure that "Password is required to login" error is displayed, otherwise fail test
element '#loginError' text contains 'Password is required to login'

Before writing your own script, please delete our example script (select entire text in editor and press "Delete" key on your keyboard). Please note that script begins with "open" command and only one "open" command is allowed per script.

If you would like to open (test) multiple pages you would have to write separate scripts (tests) for each page, each containing its own "open" command.

This kind of synthetic monitoring allows you to simulate user behaviour on your website by running user actions (open URL, assign text, click element, ...) and allows you more deep insight into your web application. With this kind of tests you can detect problems which are hard to detect with standard website checks.

If you have questions please let us know. We can also help you write your test script if you have issues.

Website monitoring now with preferred test location

We have successfully completed deployment of AppBeat 1.1

Our paid users should now have option to select preferred test location (Account / Check settings), where free users have only "Random location" option. Similar functionality is also provided by Pingdom and StatusCake.

Everyone can also fine-tune "Number of confirmation checks" option which defines behaviour when your check does not return positive result. By default we try to confirm failure by two additional confirmation checks from different geographic locations and networks. This minimizes number of false positive alerts.

If you monitor non-critical system, you can delay alerts by up to five minutes. If system is failing for entire delay period then alert will be issued at the end of that period (for example after five minutes since failure started).

In Account / Personalization you can now also set date and time format which are used on web user interface and in notifications (SMS, email).

We are now actively working on AppBeat 1.2 which will allow you functional website testing (also known as synthetic or transaction monitoring). For example, you will be able to test search process on your website, user login, adding items to shopping cart, etc.

If you have any comment you can always send us your feedback.

New website monitoring features (coming soon)

Hello AppBeat users.

Most of our users are currently very happy with our service which gives us a lot of confidence that we are building right tool for you. Thank you for this!

We just wanted to notify you that we are currently finalizing work on new AppBeat version (1.1) which will bring new cool features. We will give you more control about core AppBeat behaviour and we will add more personalization options (we won't say much more at this point, stay tuned for version 1.1 :)

After we publish version 1.1, we already have new very useful feature planned for version 1.2 (it should also stay secret for now).

If you have your own ideas which should be implemented in AppBeat please submit them to our idea pool. Most voted ideas are probably going to be implemented in one of future versions.

AppBeat improvements

Our monitoring platform now supports microservices architecture which allows us to deploy AppBeat monitoring agents to any geographic location.

Currently we support following locations:

  • Southeast Asia
  • East Asia
  • Japan
  • North Europe
  • Central US
  • East US

Every outage that we now detect must be confirmed by three different locations. Soon we will allow paid users to choose their prefered monitoring location (to have more consistent response time).