---
title: "resin 监控"
author: "showlike"
date: "2014-06-06T14:42:18Z"
tags: []
categories: ["企业架构"]
slug: "resin"
draft: false
lastmod: "2014-06-11T11:57:42Z"
id: 2076734
url: "https://showlike.iteye.com/blog/2076734"
---

**一、resin自带监控**
<https://raocl.wordpress.com/2011/01/12/resin-status/>

**二、监控resin连接状态脚本**

```java

[root@searchweb adminscripts]# cat /home/adminscripts/page_check.sh
#!/bin/sh
check_url=`/usr/local/nagios/libexec/check_http -I 192.168.1.1 -p 8080 -u "/so/topic?site=xcar&k=%E5%A5%A5%E8%BF%AA&f=subject,message&r=tid,subject,posttime&s=posttime@desc&pn=1&ps=50" -t 3 -e 200 -s Record|cut -d ':' -f 1`
http_stats="HTTP OK"
pathdir='/home/adminscripts'
DATE=`date +%Y%m%d-%H:%M`
if [ "$check_url" != "$http_stats" ];then
    echo "CRITICAL - Connected faild"
    echo "resin is down at $DATE >> $pathdir/resinlog"
    exit  3
else
     echo "OK - Connected ok"
     exit  0

fi

手动执行结果

[root@searchweb ~]# sh /home/adminscripts/page_check.sh
OK - Connected ok

```


原文链接：<http://blog.csdn.net/xingfujie/article/details/7469286>

三、JMX对Resin内存状态进行监控
<http://harrywu304.blog.163.com/blog/static/8456603201003011412900/>

<span style="color:red">注：只实践第一、三种方式，第二种未实践，只为做记录使用</span>