Esempio n. 1
0
        private static Screenboard GetDashBoard(DataDogConfig datadogConfiguration, string dashboardId)
        {
            var dProcessor = new DataDogProcessor(datadogConfiguration);
            var dashboard  = dProcessor.GetDashboardById(dashboardId);

            return(dashboard);
        }
Esempio n. 2
0
        private static void ProcessSingleWidget(DataDogConfig datadogConfiguration, string dashboardId, string checkId, string checkName)
        {
            if (string.IsNullOrEmpty(dashboardId))
            {
                throw new ArgumentNullException("DashboardId is missing");
            }

            if (string.IsNullOrEmpty(checkId))
            {
                throw new ArgumentNullException("checkId is missing");
            }

            if (string.IsNullOrEmpty(checkName))
            {
                throw new ArgumentNullException("checkName is missing");
            }


            var dProcessor = new DataDogProcessor(datadogConfiguration);
            var dashboard  = dProcessor.GetDashboardById(dashboardId);
            var title      = checkName;

            var wigetsToAdd = new List <Widget> {
                Widget.CreatePingdomCheckWidget(title, checkName, checkId)
            };
            var updateddashboard = dProcessor.AddWidgetDashboard(dashboard, wigetsToAdd);
        }