コード例 #1
0
        /// <summary>
        /// https://community.appdynamics.com/t5/Knowledge-Base/Controller-and-Agent-ADD-Limit-Notifications-Explanations/ta-p/23273#CONTROLLER_ASYNC_ADD_REG_LIMIT_REACHED
        /// </summary>
        /// <param name="hcrd"></param>
        /// <param name="jobTarget"></param>
        /// <param name="healthCheckSettingsDictionary"></param>
        /// <param name="controllerSettingsList"></param>
        /// <returns></returns>
        private List <HealthCheckRuleResult> evaluate_Controller_Setting_ADD_Limits(
            HealthCheckRuleDescription hcrd,
            JobTarget jobTarget,
            Dictionary <string, HealthCheckSettingMapping> healthCheckSettingsDictionary,
            List <ControllerSetting> controllerSettingsList)
        {
            logger.Trace("Evaluating {0}", hcrd);

            HealthCheckRuleResult healthCheckRuleResult = createHealthCheckRuleResult(jobTarget, "Controller", jobTarget.Controller, 0, hcrd);

            healthCheckRuleResult.Application = "[ALL APPS]";

            List <HealthCheckRuleResult> healthCheckRuleResults = new List <HealthCheckRuleResult>();

            if (controllerSettingsList != null)
            {
                // Defined in Enterprise Console via various
                // C:\AppDynamics\Platform\platform-admin\archives\controller\4.5.4.15417\playbooks\controller-<size>.groovy
                ControllerSetting controllerSettingProfile = controllerSettingsList.Where(s => s.Name == "performance.profile").FirstOrDefault();
                if (controllerSettingProfile != null)
                {
                    List <ControllerSetting> controllerSettingsLimits = controllerSettingsList.Where(s => s.Name.Contains(".registration.limit")).ToList();
                    if (controllerSettingsLimits != null)
                    {
                        foreach (ControllerSetting controllerSetting in controllerSettingsLimits)
                        {
                            string lookupSettingName = String.Format("ControllerSetting.{0}.{1}", controllerSettingProfile.Value, controllerSetting.Name);

                            int settingCurrentValue     = -1;
                            int settingDefaultValue     = -1;
                            int settingRecommendedValue = -1;
                            if (Int32.TryParse(controllerSetting.Value, out settingCurrentValue) == true)
                            {
                                HealthCheckRuleResult healthCheckRuleResult1 = healthCheckRuleResult.Clone();
                                healthCheckRuleResult1.Name  = String.Format("{0} ({1})", healthCheckRuleResult.Name, controllerSetting.Name);
                                healthCheckRuleResult1.Grade = -1;

                                // All settings are taken
                                // from C:\AppDynamics\Platform\platform-admin\archives\controller\4.5.4.15417\playbooks\controller-<size>.groovy in EC
                                // And from careful review of significant number of controllers
                                switch (controllerSetting.Name)
                                {
                                case "application.custom.metric.registration.limit":
                                case "application.metric.registration.limit":
                                case "async.thread.tracking.registration.limit":
                                case "metric.registration.limit":
                                case "sep.ADD.registration.limit":
                                case "stacktrace.ADD.registration.limit":
                                case "error.registration.limit":
                                    // maxStacktracePerAccountLimit = 4000
                                    // maxSepPerAccountLimit = 4000
                                    // maxErrorsPerAccountLimit = 4000
                                    settingRecommendedValue = getIntegerSetting(healthCheckSettingsDictionary, lookupSettingName, -1);
                                    if (settingRecommendedValue != -1)
                                    {
                                        if (settingCurrentValue == settingRecommendedValue)
                                        {
                                            healthCheckRuleResult1.Grade       = 5;
                                            healthCheckRuleResult1.Description = String.Format("Controller setting '{0}'='{1}', at recommended value", controllerSetting.Name, settingCurrentValue);
                                        }
                                        else if (settingCurrentValue < settingRecommendedValue)
                                        {
                                            healthCheckRuleResult1.Grade       = 3;
                                            healthCheckRuleResult1.Description = String.Format("Controller setting '{0}'='{1}', (<) less than recommended value '{2}'", controllerSetting.Name, settingCurrentValue, settingRecommendedValue);
                                        }
                                        else if (settingCurrentValue > settingRecommendedValue)
                                        {
                                            healthCheckRuleResult1.Grade       = 5;
                                            healthCheckRuleResult1.Description = String.Format("Controller setting '{0}'='{1}', (>) greater than recommended value '{2}'", controllerSetting.Name, settingCurrentValue, settingRecommendedValue);
                                        }
                                    }
                                    break;

                                case "collections.ADD.registration.limit":
                                    // maxCollectionsPerAccountLimit = 4000
                                    settingDefaultValue = getIntegerSetting(healthCheckSettingsDictionary, lookupSettingName, 4000);
                                    if (settingCurrentValue == settingDefaultValue)
                                    {
                                        healthCheckRuleResult1.Grade       = 3;
                                        healthCheckRuleResult1.Description = String.Format("Controller setting '{0}'='{1}', at default value", controllerSetting.Name, settingCurrentValue);
                                    }
                                    else if (settingCurrentValue < settingDefaultValue)
                                    {
                                        healthCheckRuleResult1.Grade       = 2;
                                        healthCheckRuleResult1.Description = String.Format("Controller setting '{0}'='{1}', (<) less than default value '{2}'", controllerSetting.Name, settingCurrentValue, settingDefaultValue);
                                    }
                                    else if (settingCurrentValue > settingDefaultValue)
                                    {
                                        healthCheckRuleResult1.Grade       = 5;
                                        healthCheckRuleResult1.Description = String.Format("Controller setting '{0}'='{1}', (>) greater than default value '{2}'", controllerSetting.Name, settingCurrentValue, settingDefaultValue);
                                    }
                                    break;

                                case "tracked.object.ADD.registration.limit":
                                    // maxTrackedObjectAccountLimit = 4000
                                    settingDefaultValue = getIntegerSetting(healthCheckSettingsDictionary, lookupSettingName, 4000);
                                    if (settingCurrentValue == settingDefaultValue)
                                    {
                                        healthCheckRuleResult1.Grade       = 3;
                                        healthCheckRuleResult1.Description = String.Format("Controller setting '{0}'='{1}', at default value", controllerSetting.Name, settingCurrentValue);
                                    }
                                    else if (settingCurrentValue < settingDefaultValue)
                                    {
                                        healthCheckRuleResult1.Grade       = 2;
                                        healthCheckRuleResult1.Description = String.Format("Controller setting '{0}'='{1}', (<) less than default value '{2}'", controllerSetting.Name, settingCurrentValue, settingDefaultValue);
                                    }
                                    else if (settingCurrentValue > settingDefaultValue)
                                    {
                                        healthCheckRuleResult1.Grade       = 5;
                                        healthCheckRuleResult1.Description = String.Format("Controller setting '{0}'='{1}', (>) greater than default value '{2}'", controllerSetting.Name, settingCurrentValue, settingDefaultValue);
                                    }
                                    break;

                                case "memory.ADD.registration.limit":
                                    // maxMemoryPointsPerAccountLimit = 4000
                                    settingDefaultValue = getIntegerSetting(healthCheckSettingsDictionary, lookupSettingName, 4000);
                                    if (settingCurrentValue == settingDefaultValue)
                                    {
                                        healthCheckRuleResult1.Grade       = 3;
                                        healthCheckRuleResult1.Description = String.Format("Controller setting '{0}'='{1}', at default value", controllerSetting.Name, settingCurrentValue);
                                    }
                                    else if (settingCurrentValue < settingDefaultValue)
                                    {
                                        healthCheckRuleResult1.Grade       = 2;
                                        healthCheckRuleResult1.Description = String.Format("Controller setting '{0}'='{1}', (<) less than default value '{2}'", controllerSetting.Name, settingCurrentValue, settingDefaultValue);
                                    }
                                    else if (settingCurrentValue > settingDefaultValue)
                                    {
                                        healthCheckRuleResult1.Grade       = 5;
                                        healthCheckRuleResult1.Description = String.Format("Controller setting '{0}'='{1}', (>) greater than default value '{2}'", controllerSetting.Name, settingCurrentValue, settingDefaultValue);
                                    }
                                    break;

                                case "backend.registration.limit":
                                    // maxBackendsPerAccountLimit = 100000
                                    settingDefaultValue = getIntegerSetting(healthCheckSettingsDictionary, lookupSettingName, 10000);
                                    if (settingCurrentValue == settingDefaultValue)
                                    {
                                        healthCheckRuleResult1.Grade       = 3;
                                        healthCheckRuleResult1.Description = String.Format("Controller setting '{0}'='{1}', at default value", controllerSetting.Name, settingCurrentValue);
                                    }
                                    else if (settingCurrentValue < settingDefaultValue)
                                    {
                                        healthCheckRuleResult1.Grade       = 2;
                                        healthCheckRuleResult1.Description = String.Format("Controller setting '{0}'='{1}', (<) less than default value '{2}'", controllerSetting.Name, settingCurrentValue, settingDefaultValue);
                                    }
                                    else if (settingCurrentValue > settingDefaultValue)
                                    {
                                        healthCheckRuleResult1.Grade       = 5;
                                        healthCheckRuleResult1.Description = String.Format("Controller setting '{0}'='{1}', (>) greater than default value '{2}'", controllerSetting.Name, settingCurrentValue, settingDefaultValue);
                                    }
                                    break;

                                case "controller.metric.registration.limit":
                                // Don't know what this one means
                                default:
                                    break;
                                }

                                if (healthCheckRuleResult1.Grade != -1)
                                {
                                    healthCheckRuleResults.Add(healthCheckRuleResult1);
                                }
                            }
                        }
                    }
                }
            }

            return(healthCheckRuleResults);
        }
コード例 #2
0
        /// <summary>
        /// https://community.appdynamics.com/t5/Knowledge-Base/Why-am-I-receiving-the-error-quot-Controller-Metric-Data-Buffer/ta-p/14653
        /// https://community.appdynamics.com/t5/Knowledge-Base/Why-are-snapshots-missing-in-the-Controller/ta-p/19047
        /// </summary>
        /// <param name="hcrd"></param>
        /// <param name="jobTarget"></param>
        /// <param name="healthCheckSettingsDictionary"></param>
        /// <param name="controllerSettingsList"></param>
        /// <returns></returns>
        private List <HealthCheckRuleResult> evaluate_Controller_Setting_Buffer_Sizes(
            HealthCheckRuleDescription hcrd,
            JobTarget jobTarget,
            Dictionary <string, HealthCheckSettingMapping> healthCheckSettingsDictionary,
            List <ControllerSetting> controllerSettingsList)
        {
            logger.Trace("Evaluating {0}", hcrd);

            HealthCheckRuleResult healthCheckRuleResult = createHealthCheckRuleResult(jobTarget, "Controller", jobTarget.Controller, 0, hcrd);

            healthCheckRuleResult.Application = "[ALL APPS]";

            List <HealthCheckRuleResult> healthCheckRuleResults = new List <HealthCheckRuleResult>();

            if (controllerSettingsList != null)
            {
                // Defined in Enterprise Console via various
                // C:\AppDynamics\Platform\platform-admin\archives\controller\4.5.4.15417\playbooks\controller-<size>.groovy
                ControllerSetting controllerSettingProfile = controllerSettingsList.Where(s => s.Name == "performance.profile").FirstOrDefault();
                if (controllerSettingProfile != null)
                {
                    List <ControllerSetting> controllerSettingsBuffers = controllerSettingsList.Where(s => s.Name.Contains(".buffer.size")).ToList();
                    if (controllerSettingsBuffers != null)
                    {
                        foreach (ControllerSetting controllerSetting in controllerSettingsBuffers)
                        {
                            // Dealing with only these:
                            // events.buffer.size
                            // metrics.buffer.size
                            // process.snapshots.buffer.size
                            // snapshots.buffer.size

                            string lookupSettingName = String.Format("ControllerSetting.{0}.{1}", controllerSettingProfile.Value, controllerSetting.Name);

                            int settingCurrentValue = -1;
                            Int32.TryParse(controllerSetting.Value, out settingCurrentValue);

                            int settingDefaultValue = getIntegerSetting(healthCheckSettingsDictionary, lookupSettingName, -1);

                            if (settingDefaultValue != -1 && settingCurrentValue != -1)
                            {
                                HealthCheckRuleResult healthCheckRuleResult1 = healthCheckRuleResult.Clone();
                                healthCheckRuleResult1.Name = String.Format("{0} ({1})", healthCheckRuleResult.Name, controllerSetting.Name);

                                if (settingCurrentValue == settingDefaultValue)
                                {
                                    healthCheckRuleResult1.Grade       = 5;
                                    healthCheckRuleResult1.Description = String.Format("Controller performance profile is '{0}', setting '{1}'='{2}', at default value", controllerSettingProfile.Value, controllerSetting.Name, settingCurrentValue);
                                }
                                else if (settingCurrentValue < settingDefaultValue)
                                {
                                    healthCheckRuleResult1.Grade       = 3;
                                    healthCheckRuleResult1.Description = String.Format("Controller performance profile is '{0}', setting '{1}'='{2}', (<) less than default value '{3}'", controllerSettingProfile.Value, controllerSetting.Name, settingCurrentValue, settingDefaultValue);
                                }
                                else if (settingCurrentValue > settingDefaultValue)
                                {
                                    healthCheckRuleResult1.Grade       = 4;
                                    healthCheckRuleResult1.Description = String.Format("Controller performance profile is '{0}', setting '{1}'='{2}', (>) greater than default value '{3}'", controllerSettingProfile.Value, controllerSetting.Name, settingCurrentValue, settingDefaultValue);
                                }

                                healthCheckRuleResults.Add(healthCheckRuleResult1);
                            }
                        }
                    }
                }
            }

            return(healthCheckRuleResults);
        }