Como avisar usando nagios se o valor de privvmpages exceder o limite de um aplicativo

0

Seria uma grande ajuda Se alguém pudesse me ajudar a conseguir isso.

I've rented a VPS with 20GM RAM, but privvmpages maximum limit is 5GB. I have nexus, hudson, puppet, glassfish cluster with one instance, and other 3 java applications running since all these are Java based, In my understanding, privvmpages look for jvm memory as a whole and not jvm memory of individual applications.

And I have configured nagios to monitor some of my applications and its working. Now the complicated part is, I want a service in nagios that alert me when the jvm memory limit as a whole exceeds privvmpages maximum limit.

Existe um serviço disponível? ou isso é possível em primeiro lugar?

Eu pesquisei mas não consegui encontrar nada

UPDATE 1:  Encontrei algumas informações úteis, na verdade eu estava errado no meu post original. Meu entendimento era que privvmpages sempre alocavam memória até atingir o limite máximo. Mas

applications are guaranteed to be able to allocate additional memory so long as the amount of memory accounted as privvmpages (see the auxiliary prarameters) does not exceed the configured barrier of the vmguarpages parameter. Above the barrier, additional memory allocation is not guaranteed and may fail in case of overall memory shortage.

    
por Kenshin 08.09.2016 / 18:49

1 resposta

0

Depois de ler muitos posts, não acho que possamos encontrar o tamanho privvmpage do aplicativo individual. em vez disso, podemos fazer isso

#!/bin/bash
bean='cat /proc/user_beancounters'
guar='echo "$bean" | grep vmguar | awk '{ print $4;}''
priv='echo "$bean" | grep privvm | awk '{ print $2;}''
let totl=guar/256
let used=priv/256
let free=totl-used
let per=used*100/totl
echo "VPS Memory:"
echo "  total: $totl mb   used: $used mb ($per%)   free: $free mb"

Configure isso no nagios e compare os valores limite de used / free para alertar os avisos do nagios

História por trás disso

cat / proc / user_beancounters

A primeira coluna informa seu uso atual, a segunda coluna informa o uso máximo, a terceira coluna informa a barreira, a quarta coluna informa o limite, a coluna final informa quantas vezes o seu VPS falhou em um limite.

Para converter páginas em MB, divida por 256.

    
por Kenshin 08.09.2016 / 21:33