scouter
scouter copied to clipboard
[Customizable Alert]Tomcat 지원여부 문의
안녕하세요. Scouter 를 잘 활용하고 있어 우선 감사를 전합니다. tomcat TPS 에 관해 알람을 설정하고 싶은데, javaee 를 통해서는 안되는 것 같아서요. 설정이 가능한가요?
스카우터 콜렉터의 script plugin을 사용하시면 모든 성능 지표에 대해 알림을 걸 수 있습니다. http://gunsdevlog.blogspot.com/2018/05/scouter-customizable-alert.html 위 포스팅을 참고해보세요.
@gunlee01
String objType = $counter.getObjType();
String objName = $counter.getObjName();
float tps = $counter.getFloatValue("TPS");
String title = "TPS alert";
String message = "TPS is over 1.0\n";
message += "[objType] " + objType + "\n";
message += "[objName] " + objName + "\n";
message += "[TPS] " + tps;
if(tps > 1.0 && "tomcat".equals(objType)) {
$counter.fatal(title, message);
}
collector 를 javaee 를 선택한 뒤에 objType 이 tomcat 일 때 alert 을 보내도록 하면 되는군요. 감사합니다.