#5337 add monitoring for fedoramagazine
Closed: Fixed None Opened 7 years ago by kevin.

We should add some basic monitoring of fedoramagazine and perhaps some http check that makes sure it's serving it's front page at least.


Hi i'm working on this ticket. Could you please assign me?

The nagios host definition under '''ansible/roles/nagios/server/files/nagios/hosts''' could be:

{{{

define host {
host_name magazine.fedorainfracloud.org
alias magazine
use defaulttemplate
address magazine.fedorainfracloud.org
}

}}}

nagios magazine.fedorainfracloud.org
magazine.cfg

The nrpe definition could be (adding magazine) under '''ansible/roles/nagios/server/files/nagios/services''' editing nrpe.cfg file:

{{{
define service {
host_name hosted03, bastion02, bastion01, bastion-vpn, sundries01, sundries01.stg, sundries02, wiki01, wiki01.stg, wiki02, pkgdb01, pkgdb02, pkgdb01.stg, magazine
service_description nrpe
check_command test_nrpe
max_check_attempts 2
normal_check_interval 2
use defaulttemplate
}

}}}

The Http check could be added in website.cfg under '''ansible/roles/nagios/server/files/nagios/services

{{{
define service {
host_name magazine
service_description HTTP check
use websitetemplate
check_command check_website!magazine.fedorainfracloud.org
}

}}}

Hi what do you think about it?
It's ok or needs some modification?

That looks good, but can you make it in the form of a git patch? ;)

Basically you clone the ansible repo on batcave01, then make your changes to your copy.
Then do a 'git add' for new files and 'git commit -a' and enter a commit message, then use 'git format-patch' to create a patch to attach here. ;)

This way we can see exactly whats changed and also when we apply it you will get credit, etc. :)

Please ask on irc if that doesn't make sense or you get stuck anywhere.

You're right! :)
Everything it's clear and i added the patch.

Thanks nirik! ;)

ok, applied! :)

I did have to do a bit of tweaking (which is normal with nagios as it's config is such a pain):

  • I swapped host and alias, we for some reason use the short name for host and the fqdn for alias.

  • I added the nagios/client role to the magazine playbook so it could be answering nrpe on its end.

  • I added the nagios security group to the magazine cloud instance so nrpe would be allowed to it.

I think all is working now. Thank you very much for working on this!

Login to comment on this ticket.

Metadata