Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add script to test gateway status when finished #99

Closed
rubo77 opened this issue Mar 2, 2015 · 10 comments
Closed

Add script to test gateway status when finished #99

rubo77 opened this issue Mar 2, 2015 · 10 comments

Comments

@rubo77
Copy link
Contributor

rubo77 commented Mar 2, 2015

There should be added a script, that shows a status of the gateway when you are logged in via SSH, with:

  • all services that should run
  • an analysis of all configurations
  • if everything is set up correctly.
  • ...

This could look like this:

#!/bin/bash
set -x

maintenance status
batctl-ffki gw
service openvpn status
ping -I tun-anonvpn 8.8.8.8
batctl-ffki gw
service --status-all 2>&1 | egrep '(bird6|openvpn|fastd|alfred|bat)'
@ohrensessel
Copy link
Contributor

generally a very good idea. might be helpful to check everything while connected via ssh.
however, we have to avoid duplicated code with the monitoring solutions here I would say.

would be nice if you provide a pull requests we then can review and merge.

@rubo77
Copy link
Contributor Author

rubo77 commented Mar 3, 2015

Where would this kind of script be in the correct place? In usr local bin?
https://github.com/ffnord/ffnord-puppet-gateway/tree/master/files/usr/local/bin

I need some more tips what tests should be included and where I should look for the same code so I don't create duplicate content.

Could you provide a link where to find a complete list of all services that should run on a Gateway?

@sargon
Copy link
Contributor

sargon commented Mar 4, 2015

My opinion on this is that we should carefully check if the puppet script is raising all the services on first apply. For everything else we have monitoring systems, that is what they do.

When we have anything which is not nicely monitor-able, create a new check for that.

@rubo77
Copy link
Contributor Author

rubo77 commented Mar 4, 2015

@sargon: But even you do a lot of stuff on the console like

pgrep -lf fastd

It would be nice to have such a collection of commands how to check the healt status of a gateway from within.

@sargon
Copy link
Contributor

sargon commented Mar 4, 2015

Yes, of course I do. We have nagios or zabbix for that task, so create checks for everything you find no check for. For prevention of code duplication call these checks.

So a wrapper script around nagios/zabbix checks would be the way to go.

@rubo77
Copy link
Contributor Author

rubo77 commented Mar 16, 2015

Where can I find the existing checks? (I have no access to the nagios VM)

@sargon
Copy link
Contributor

sargon commented Mar 21, 2015

With nagios all checks targeting local status are on the machine, located in /etc/nagios/

@rubo77
Copy link
Contributor Author

rubo77 commented Mar 24, 2015

OK what I found out so far:

there is nrpe installed on all VPNs that allows the nagios instance on our main server to call the scripts located in /etc/nagios/

This would call them locally:

/usr/lib/nagios/plugins/check_nrpe -H localhost

But that local check is not installed my the puppet scripts, so finally, that would be all that has to be done here:

Add the local nagios check to the puppet scripts.

@rubo77
Copy link
Contributor Author

rubo77 commented Jun 8, 2015

without nagios you can check already some tasks if they are running with these lines:

service --status-all 2>&1 | egrep '(bird6|openvpn|fastd|alfred|bat)'
pgrep -lf '(bird6|openvpn|fastd|alfred|bat)'

@rubo77
Copy link
Contributor Author

rubo77 commented Aug 3, 2015

This would be a script to call on the machine:

#127

@rubo77 rubo77 closed this as completed Apr 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants