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:
UnAnagenteagentllamadocalled AWS EC2 (asyadefinedqueexplicitlyestaindefinidotheentwolosmodulesdosthatmódulosexecuteque ejecutanec2 queriesde ec2 arriba, explícitamente)above).
EsteThis agenteagent contendríawould loscontain siguientesthe módulosfollowing :modules:
UnAnagenteagentllamadocalled AWS general (eltheagentedefaultpor defecto)agent)
EsteThis agenteagent contendríawould loscontain siguientesthe módulosfollowing :modules: