using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
using System;

namespace DotNetRu.Azure
{
    [Route("diagnostics")]
    public class DiagnosticsController : ControllerBase
    {
        private readonly ILogger logger;

        public DiagnosticsController(
            ILogger<DiagnosticsController> logger)
        {
            this.logger = logger;
        }

        [HttpPost]
        [Route("ping")]
        public async Task<IActionResult> Ping()
        {
            try
            {
                logger.LogInformation("Ping is requested");

                return new OkObjectResult("Success");
            }
            catch (Exception e)
            {
                logger.LogCritical(e, "Unhandled error while ping");
                return new ObjectResult(e) { 
                    StatusCode = StatusCodes.Status500InternalServerError 
                };
            }
        }
    }
}

using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using DotNetRu.AzureService;

namespace DotNetRu.Azure
{
    [Route("diagnostics")]
    public class DiagnosticsController : ControllerBase
    {
        private readonly ILogger logger;

        private readonly RealmSettings realmSettings;
        private readonly TweetSettings tweetSettings;
        private readonly PushSettings pushSettings;
        private readonly VkontakteSettings vkontakteSettings;

        public DiagnosticsController(
            ILogger<DiagnosticsController> logger,
            RealmSettings realmSettings,
            TweetSettings tweetSettings,
            VkontakteSettings vkontakteSettings,
            PushSettings pushSettings)
        {
            this.logger = logger;
            this.realmSettings = realmSettings;
            this.tweetSettings = tweetSettings;
            this.vkontakteSettings = vkontakteSettings;
            this.pushSettings = pushSettings;
        }

        [HttpGet]
        [Route("settings")]
        public IActionResult Settings()
        {
            return new ObjectResult(new
            {
                RealmSettings = realmSettings,
                TweetSettings = tweetSettings,
                VkontakteSettings = vkontakteSettings,
                pushSettings = pushSettings
            });
        }
    }
}

Add method to get service settings
Add method to get service settings
