Skip to content

Commit

Permalink
Add: link to the scripts repo with libexec, and add LOT of services w…
Browse files Browse the repository at this point in the history
…ith good macros
  • Loading branch information
naparuba committed Feb 26, 2014
1 parent 0500486 commit a2498db
Show file tree
Hide file tree
Showing 25 changed files with 244 additions and 82 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*~

3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "libexec"]
path = libexec
url = https://github.com/naparuba/check-linux-by-ssh.git
1 change: 1 addition & 0 deletions libexec
Submodule libexec added at 46e049
88 changes: 82 additions & 6 deletions pack/commands.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,95 @@
#
# -----------------------------------------------------------------

#

define command {
command_name check_ssh_connexion
command_line $PLUGINSDIR$/check_ssh_connexion.py -H $HOSTADDRESS$
command_line $PLUGINSDIR$/check_ssh_connexion.py -H $HOSTADDRESS$ -u $_HOSTSSH_USER$ -i $_HOSTSSH_KEY$ -P "$_HOSTSSH_KEY_PASSPHRASE$"
}



define command {
command_name check_ssh_linux_memory
command_line $PLUGINSDIR$/check_memory_by_ssh.py -H $HOSTADDRESS$ -u $_HOSTSSH_USER$ -i $_HOSTSSH_KEY$ -P "$_HOSTSSH_KEY_PASSPHRASE$" -w "$_HOSTMEMORY_WARN$" -c "$_HOSTMEMORY_CRIT$" -m -s
}



define command {
command_name check_ssh_linux_cpu_stats
command_line $PLUGINSDIR$/check_cpu_stats_by_ssh.py -H $HOSTADDRESS$ -u $_HOSTSSH_USER$ -i $_HOSTSSH_KEY$ -P "$_HOSTSSH_KEY_PASSPHRASE$"
}


define command {
command_name check_ssh_linux_disks
command_line $PLUGINSDIR$/check_disks_by_ssh.py -H $HOSTADDRESS$ -u $_HOSTSSH_USER$ -i $_HOSTSSH_KEY$ -P "$_HOSTSSH_KEY_PASSPHRASE$" -U $_HOSTSTORAGE_UNIT$ -w $_HOSTSTORAGE_WARN$ -c $_HOSTSTORAGE_CRIT$ -m '$_HOSTSTORAGE_MOUNTS$'
}



define command {
command_name check_ssh_linux_disks_stats
command_line $PLUGINSDIR$/check_disks_stats_by_ssh.py -H $HOSTADDRESS$ -u $_HOSTSSH_USER$ -i $_HOSTSSH_KEY$ -P "$_HOSTSSH_KEY_PASSPHRASE$"
}

define command {
command_name check_ssh_linux_kernel_stats
command_line $PLUGINSDIR$/check_kernel_stats_by_ssh.py -H $HOSTADDRESS$ -u $_HOSTSSH_USER$ -i $_HOSTSSH_KEY$ -P "$_HOSTSSH_KEY_PASSPHRASE$"
}


define command {
command_name check_ssh_linux_load_average
command_line $PLUGINSDIR$/check_load_average_by_ssh.py -H $HOSTADDRESS$ -u $_HOSTSSH_USER$ -i $_HOSTSSH_KEY$ -P "$_HOSTSSH_KEY_PASSPHRASE$" -w "$_HOSTLOAD_WARN$" -c "$_HOSTLOAD_CRIT$"
}



define command {
command_name check_ssh_linux_processes
command_line $PLUGINSDIR$/check_processes_by_ssh.py -H $HOSTADDRESS$ -u $_HOSTSSH_USER$ -i $_HOSTSSH_KEY$ -P "$_HOSTSSH_KEY_PASSPHRASE$" -C "$ARG1$"
}



define command {
command_name check_ssh_linux_tcp_states
command_line $PLUGINSDIR$/check_tcp_states_by_ssh.py -H $HOSTADDRESS$ -u $_HOSTSSH_USER$ -i $_HOSTSSH_KEY$ -P "$_HOSTSSH_KEY_PASSPHRASE$"
}


define command {
command_name check_linux_disks_ssh
command_line $PLUGINSDIR$/check_disks_by_ssh.py -H $HOSTADDRESS$ -w $_HOSTSTORAGE_SSH_WARN$ -c $_HOSTSTORAGE_SSH_CRIT$ -U $_HOSTSTORAGE_SSH_UNIT$
command_name check_ssh_linux_net_stats
command_line $PLUGINSDIR$/check_net_stats_by_ssh.py -H $HOSTADDRESS$ -u $_HOSTSSH_USER$ -i $_HOSTSSH_KEY$ -P "$_HOSTSSH_KEY_PASSPHRASE$"
}

define command {
command_name check_linux_memory_ssh
command_line $PLUGINSDIR$/check_memory_by_ssh.py -H $HOSTADDRESS$ -w $_HOSTMEMORY_SSH_WARN$ -c $_HOSTMEMORY_SSH_CRIT$
command_name check_ssh_ro_filesystem
command_line $PLUGINSDIR$/check_ro_filesystem_by_ssh.py -H $HOSTADDRESS$ -u $_HOSTSSH_USER$ -i $_HOSTSSH_KEY$ -P "$_HOSTSSH_KEY_PASSPHRASE$"
}


define command {
command_name check_ssh_linux_uptime
command_line $PLUGINSDIR$/check_uptime_by_ssh.py -H $HOSTADDRESS$ -u $_HOSTSSH_USER$ -i $_HOSTSSH_KEY$ -P "$_HOSTSSH_KEY_PASSPHRASE$"
}


define command {
command_name check_ssh_linux_ntp_sync
command_line $PLUGINSDIR$/check_ntp_sync_by_ssh.py -H $HOSTADDRESS$ -u $_HOSTSSH_USER$ -i $_HOSTSSH_KEY$ -P "$_HOSTSSH_KEY_PASSPHRASE$" -w 40 -c 60
}

define command {
command_name check_ssh_linux_ntp_sync_chrony
command_line $PLUGINSDIR$/check_ntp_sync_by_ssh.py -H $HOSTADDRESS$ -u $_HOSTSSH_USER$ -i $_HOSTSSH_KEY$ -P "$_HOSTSSH_KEY_PASSPHRASE$" -C -w "$_HOSTDELAY_WARNING$,$_HOSTOFFSET_WARNING$" -c "$_HOSTDELAY_CRITICAL$,$_HOSTOFFSET_CRITICAL$"
}


define command {
command_name check_ssh_linux_nfs_stats
command_line $PLUGINSDIR$/check_nfs_stats_by_ssh.py -H $HOSTADDRESS$ -u $_HOSTSSH_USER$ -i $_HOSTSSH_KEY$ -P "$_HOSTSSH_KEY_PASSPHRASE$"
}

9 changes: 9 additions & 0 deletions pack/services/connexion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This is a check based on the load average look by ssh
define service{
service_description SSH Connexion
use linux-ssh-service
register 0
host_name linux-ssh
check_command check_ssh_connexion

}
11 changes: 0 additions & 11 deletions pack/services/cpu.cfg

This file was deleted.

10 changes: 10 additions & 0 deletions pack/services/cpu_stats.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This is a check based on the load average look by ssh
define service{
service_description CPU Stats
use linux-ssh-service
register 0
host_name linux-ssh
check_command check_ssh_linux_cpu_stats

aggregation system/perfs
}
11 changes: 6 additions & 5 deletions pack/services/disks.cfg
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# This is a check based on the disks look by ssh
define service{
service_description Disks
use linux-ssh-service
register 0
host_name linux-ssh
check_command check_linux_disks_ssh
service_description Disks
use linux-ssh-service
register 0
host_name linux-ssh
check_command check_ssh_linux_disks

}
10 changes: 10 additions & 0 deletions pack/services/disks_stats.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This is a check based on the disks stats look by ssh
define service{
service_description Disks Stats
use linux-ssh-service
register 0
host_name linux-ssh
check_command check_ssh_linux_disks_stats

aggregation system/perfs
}
10 changes: 10 additions & 0 deletions pack/services/kernel_stats.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This is a check based on the disks stats look by ssh
define service{
service_description Kernel Stats
use linux-ssh-service
register 0
host_name linux-ssh
check_command check_ssh_linux_kernel_stats

aggregation system/perfs
}
11 changes: 0 additions & 11 deletions pack/services/load.cfg

This file was deleted.

10 changes: 10 additions & 0 deletions pack/services/load_average.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This is a check based on the load average look by ssh
define service{
service_description Load Average
use linux-ssh-service
register 0
host_name linux-ssh
check_command check_ssh_linux_load_average

aggregation system/perfs
}
12 changes: 0 additions & 12 deletions pack/services/logFiles.cfg

This file was deleted.

6 changes: 2 additions & 4 deletions pack/services/memory.cfg
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# This is a check based on the memory look by ssh
define service{
service_description Memory
use linux-ssh-service
register 0
host_name linux-ssh
check_command check_linux_memory_ssh
check_command check_ssh_linux_memory

_DETAILLEDESC Espace disque reserve pour heberge les pages memoire devenues inutilisees, il est donc plus avantageux de basculer ces pages sur disque plutôt qu’en memoire RAM qui heberge de donnees vives.
_IMPACT Moyen: Trop d’espace de pagination occupe signifie que le systeme n’a pas assez de la memoire vive pour faire fonctionner ses applications. Un important ralentissement se fera sentir dans ce cas
_FIXACTIONS Audit de performance si l’evenement survient dans une utilisation normale du systeme. Rajout de RAM sur le serveur en dernier recours.
}
10 changes: 10 additions & 0 deletions pack/services/net_stats.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This is a check based on the load average look by ssh
define service{
service_description NET Stats
use linux-ssh-service
register 0
host_name linux-ssh
check_command check_ssh_linux_net_stats

aggregation system/perfs
}
11 changes: 0 additions & 11 deletions pack/services/network_usage.cfg

This file was deleted.

10 changes: 10 additions & 0 deletions pack/services/nfs_stats.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This is a check based on the nfs look by ssh
define service{
service_description NFS Stats
use linux-ssh-service
register 0
host_name linux-ssh
check_command check_ssh_linux_nfs_stats

aggregation system/nfs
}
9 changes: 9 additions & 0 deletions pack/services/ntp_sync.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This is a check based on the ntp look by ssh
define service{
service_description NtpSync
use linux-ssh-service
register 0
host_name linux-ssh&!chrony
check_command check_ssh_linux_ntp_sync

}
8 changes: 8 additions & 0 deletions pack/services/ntp_sync_chrony.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This is a check based on the ntp look by ssh
define service{
service_description NtpSync
use linux-ssh-service
register 0
host_name linux-ssh&chrony
check_command check_ssh_linux_ntp_sync_chrony
}
9 changes: 9 additions & 0 deletions pack/services/ro_fs.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This is a check based on the disks stats look by ssh
define service{
service_description Read-only Filesystems
use linux-ssh-service
register 0
host_name linux-ssh
check_command check_ssh_ro_filesystem

}
9 changes: 9 additions & 0 deletions pack/services/tcp_states.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This is a check based on the load average look by ssh
define service{
service_description TCP States
use linux-ssh-service
register 0
host_name linux-ssh
check_command check_ssh_linux_tcp_states

}
12 changes: 0 additions & 12 deletions pack/services/time.cfg

This file was deleted.

9 changes: 9 additions & 0 deletions pack/services/uptime.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This is a check based on the uptime look by ssh
define service{
service_description Reboot
use linux-ssh-service
register 0
host_name linux-ssh
check_command check_ssh_linux_uptime

}
40 changes: 30 additions & 10 deletions pack/templates.cfg
Original file line number Diff line number Diff line change
@@ -1,30 +1,50 @@
# The LINUX template.
define host{
name linux-ssh
use generic-host
check_command check_ssh_connexion
register 0

_SSH_KEY ~/.ssh/id_rsa
_SSH_KEY_PASSPHRASE
_SSH_USER shinken

_STORAGE_SSH_WARN 90
_STORAGE_SSH_CRIT 95
_STORAGE_SSH_UNIT GB
_MEMORY_SSH_WARN 90
_MEMORY_SSH_CRIT 95
_LOAD_WARN 1,1,1
_LOAD_CRIT 2,2,2
_STORAGE_WARN 90
_STORAGE_CRIT 95
_STORAGE_UNIT GB
_STORAGE_MOUNTS /
_CPU_WARN 80
_CPU_CRIT 90
_MEMORY_WARN 80
_MEMORY_CRIT 90
_NET_WARN 90,90,0,0,0,0
_NET_CRIT 0,0,0,0,0,0

custom_views +linux_ssh,linux_ssh_memory,linux_ssh_processes


# Not yet implemented
# _LOAD_WARN 2,2,2
# _LOAD_CRIT 3,3,3
# _CPU_WARN 80
# _CPU_CRIT 90
# _NTP_WARN 0.128
# _NTP_CRIT 1
# _NET_IFACES eth\d+|em\d+
# _NET_WARN 90,90,0,0,0,0
# _NET_CRIT 0,0,0,0,0,0
# _CHKLOG_CONF $PLUGINSDIR$/logFiles_linux.conf
}


# The LINUX template.
define host{
name chrony
register 0

_DELAY_WARNING 0.100
_DELAY_CRITICAL 0.150
_OFFSET_WARNING 0.1
_OFFSET_CRITICAL 0.2
}


define service{
name linux-ssh-service
Expand Down
Loading

0 comments on commit a2498db

Please sign in to comment.