Skip to main content

Agents and modules generated by the plugin

LosThe agentesagents yand módulosmodules generadosgenerated porby elthe plugin,plugin dependendepend totalmenteentirely deon lathe configuraciónconfiguration establecida.settings. PorFor ejemplo,example, lathe siguiente configuraciónfollowing general yand demetric metricas :settings:

Configuración MetricasMetrics insights configuration

[
{   
    "time_frame": "5m",
    "region_name": "us-east-1",
    "MetricDataQueries": [
        {
            "Expression": "SELECT AVG(CPUUtilization) FROM SCHEMA("AWS/EC2", InstanceId) WHERE InstanceId = 'i-01e5fbcd406596f84' GROUP BY InstanceId",
            "Id": "q1",
            "Period": 300,
            "Label": "avg_cpu"
        },
        {
            "Id": "q2",
            "Expression": "(100 - q1)",
            "Label": "free space"
        }
    ]
},
{
    "time_frame": "5m",
    "region_name": "us-east-1",
    "MetricDataQueries": [
      {
        "Id": "ebs_write_time",
        "Expression": "SELECT AVG(VolumeTotalWriteTime) FROM SCHEMA("AWS/EBS", VolumeId)",
        "Label": "Average EBS Volume Total Write Time",
        "Period":300,
        "ReturnData": true
      }
    ]
},
{
    "time_frame": "5m",
    "region_name": "us-east-1",
    "MetricDataQueries": [
      {
        "Id": "ec2_cpu",
        "Expression": "SELECT MAX(CPUUtilization) FROM SCHEMA("AWS/EC2", InstanceId) GROUP BY InstanceId ORDER BY MAX() DESC LIMIT 10",
        "Label": "cpu_usage",
        "Period":300,
        "ReturnData": true
      }
    ]
}
]

ConfiguraciónGeneral generaland ymodule de módulossettings 

[CONF]
agents_group                     = 1
agent_name                       = AWS General
interval                         = 300
threads                          = 3
transfer_mode                    = tentacle
tentacle_ip                      = 172.42.42.101
tentacle_port                    = 41121

[q1]
name = __label__
type = generic_data
description = Monitors CPU utilization
unit =percent
value = average
agent = AWS EC2
min_warning = 75
min_critical = 85

[q2]
name = __label__
type = generic_data
description = Monitors CPU free space
unit = percent
value = last
min_warning = 11
max_warning = 20
min_critical = 0
max_critical = 10

[ebs_write_time]
name = __label__
type = generic_data
description = Average EBS Volume Total Write Time
value = last
agent = AWS 2 Cloudwatch

[ec2_cpu]
name = __label__
type = generic_data
description = Cpu usage
agent = AWS EC2
value = last

CrearíaIt lowould siguientecreate :the following:

  • UnAn agenteagent llamadocalled AWS EC2 (as yadefined queexplicitly estain definidothe entwo losmodules dosthat módulosexecute que ejecutanec2 queries de ec2 arriba, explícitamente)above).

EsteThis agenteagent contendríawould loscontain siguientesthe módulosfollowing :modules:

UnOne modulomodule porfor cadaeach unaof de lasthe 10 instanciasinstances deof lathe operacionoperation conwith id ec2_cpu,ec2_cpu, conwith elthe siguientefollowing nombre :name: cpu_usage <nombrename deof cadaeach instanciainstance>
UnA modulomodule parafor la operaciónoperation q1, conwith elthe siguientefollowing nombre:name: avg_cpu i-01e5fbcd406596f84
UnA modulomodule parafor la operaciónoperation q2, conwith elthe siguientefollowing nombre:name: free cpu i-01e5fbcd406596f84
  • UnAn agenteagent llamadocalled AWS general (elthe agentedefault por defecto)agent)

EsteThis agenteagent contendríawould loscontain siguientesthe módulosfollowing :modules:

UnA modulomodule parafor lathe operaciónebs_write_time ebs_write_time,operation, conwith elthe siguientefollowing nombrename: Average EBS Volume Total Write Time