Проверка AWS Check_MK - проверки RDS не работают
Я настроил мониторинг AWS с Check_MK версии 1.5.0p13 (следуя документации на официальном сайте Check_MK). Все работает, кроме проверок RDS, когда я иду, чтобы обнаружить службы, я получаю:
Service discovery failed for this host: 'DBName'
Есть ли что-нибудь, что я могу сделать для устранения этой проблемы, где я могу получить еще вывод? Есть идеи как решить это?
Это вывод:
cmk -vI aws
WARNING: Exception while parsing agent section 'aws_rds_summary': KeyError('DBName',)
File "/omd/sites/mysite/lib/python/cmk_base/data_sources/host_sections.py", line 260, in _update_with_parse_function
return parse_function(section_content)
File "/omd/sites/mysite/share/check_mk/checks/aws_rds_summary", line 30, in parse_aws_rds_summary
return {instance['DBName']: instance for instance in parse_aws(info)}
File "/omd/sites/mysite/share/check_mk/checks/aws_rds_summary", line 30, in <dictcomp>
return {instance['DBName']: instance for instance in parse_aws(info)}
WARNING: Exception while parsing agent section 'aws_rds': KeyError('DBName',)
File "/omd/sites/mysite/lib/python/cmk_base/data_sources/host_sections.py", line 260, in _update_with_parse_function
return parse_function(section_content)
File "/omd/sites/mysite/share/check_mk/checks/aws_rds", line 72, in parse_aws_rds
parsed.setdefault(metrics['DBName'], metrics)
WARNING: Exception while parsing agent section 'aws_rds': KeyError('DBName',)
File "/omd/sites/mysite/lib/python/cmk_base/data_sources/host_sections.py", line 260, in _update_with_parse_function
return parse_function(section_content)
File "/omd/sites/mysite/share/check_mk/checks/aws_rds", line 72, in parse_aws_rds
parsed.setdefault(metrics['DBName'], metrics)
WARNING: Exception while parsing agent section 'aws_rds': KeyError('DBName',)
File "/omd/sites/mysite/lib/python/cmk_base/data_sources/host_sections.py", line 260, in _update_with_parse_function
return parse_function(section_content)
File "/omd/sites/mysite/share/check_mk/checks/aws_rds", line 72, in parse_aws_rds
parsed.setdefault(metrics['DBName'], metrics)
WARNING: Exception while parsing agent section 'aws_rds_summary': KeyError('DBName',)
File "/omd/sites/mysite/lib/python/cmk_base/data_sources/host_sections.py", line 260, in _update_with_parse_function
return parse_function(section_content)
File "/omd/sites/mysite/share/check_mk/checks/aws_rds_summary", line 30, in parse_aws_rds_summary
return {instance['DBName']: instance for instance in parse_aws(info)}
File "/omd/sites/mysite/share/check_mk/checks/aws_rds_summary", line 30, in <dictcomp>
return {instance['DBName']: instance for instance in parse_aws(info)}
WARNING: Exception while parsing agent section 'aws_rds': KeyError('DBName',)
File "/omd/sites/mysite/lib/python/cmk_base/data_sources/host_sections.py", line 260, in _update_with_parse_function
return parse_function(section_content)
File "/omd/sites/mysite/share/check_mk/checks/aws_rds", line 72, in parse_aws_rds
parsed.setdefault(metrics['DBName'], metrics)
WARNING: Exception while parsing agent section 'aws_rds': KeyError('DBName',)
File "/omd/sites/mysite/lib/python/cmk_base/data_sources/host_sections.py", line 260, in _update_with_parse_function
return parse_function(section_content)
File "/omd/sites/mysite/share/check_mk/checks/aws_rds", line 72, in parse_aws_rds
parsed.setdefault(metrics['DBName'], metrics)
WARNING: Exception while parsing agent section 'aws_rds': KeyError('DBName',)
File "/omd/sites/mysite/lib/python/cmk_base/data_sources/host_sections.py", line 260, in _update_with_parse_function
return parse_function(section_content)
File "/omd/sites/mysite/share/check_mk/checks/aws_rds", line 72, in parse_aws_rds
parsed.setdefault(metrics['DBName'], metrics)
WARNING: Exception while parsing agent section 'aws_rds': KeyError('DBName',)
File "/omd/sites/mysite/lib/python/cmk_base/data_sources/host_sections.py", line 260, in _update_with_parse_function
return parse_function(section_content)
File "/omd/sites/mysite/share/check_mk/checks/aws_rds", line 72, in parse_aws_rds
parsed.setdefault(metrics['DBName'], metrics)
WARNING: Exception while parsing agent section 'aws_rds': KeyError('DBName',)
File "/omd/sites/mysite/lib/python/cmk_base/data_sources/host_sections.py", line 260, in _update_with_parse_function
return parse_function(section_content)
File "/omd/sites/mysite/share/check_mk/checks/aws_rds", line 72, in parse_aws_rds
parsed.setdefault(metrics['DBName'], metrics)
WARNING: Exception while parsing agent section 'aws_rds': KeyError('DBName',)
File "/omd/sites/mysite/lib/python/cmk_base/data_sources/host_sections.py", line 260, in _update_with_parse_function
return parse_function(section_content)
File "/omd/sites/mysite/share/check_mk/checks/aws_rds", line 72, in parse_aws_rds
parsed.setdefault(metrics['DBName'], metrics)
WARNING: Exception while parsing agent section 'aws_rds': KeyError('DBName',)
File "/omd/sites/mysite/lib/python/cmk_base/data_sources/host_sections.py", line 260, in _update_with_parse_function
return parse_function(section_content)
File "/omd/sites/mysite/share/check_mk/checks/aws_rds", line 72, in parse_aws_rds
parsed.setdefault(metrics['DBName'], metrics)
1 ответ
Решение
Проблема заключалась в ошибке, когда DBName использовался для идентификации базы данных, но это значение не всегда устанавливалось. Теперь он использует DBInstanceIdentifier.
Исправлено в версиях 1.5.0p14 и 1.6.0i1.
Если вы хотите реализовать это исправление, вы можете найти коммит diff здесь в официальном репозитории Check_MK git.