使用 Scalable Performance Monitor 监控 和分析 solr的运行状况

来源:互联网 发布:mac版pdf编辑器福昕 编辑:程序博客网 时间:2024/06/05 14:25

1,首先要注册 一个用户名和账号

https://apps.sematext.com/


2,创建一个solr类型的监控程序。安装其指定的步骤 在服务上进行操作,下面 用centos为例。

  1. 安装 collected,用于收集系统信息如,cpu,内存等情况

        sudoyuminstallcollectd

2  安装 spm监控的客户端。

sudo rpm -Uvh http://pub-repo.sematext.com/centos/sematext-centos-repo-1.17.0.noarch.rpm 
sudo yum install spm-client

3 配置spm监控模式,有In-process monitor和使用Standalone monitor进程两种模式,推荐第一种,配置较简单,这里使用第一种。

sudo bash /opt/spm/bin/spm-client-setup-conf.sh 07219029-28e9-4102-a7a9-aca1f356183f solr javaagent

  4 在 tomcat的 catalina.sh 加入jvm参数(注意 ,后面的07219029-28e9-4102-a7a9-aca1f356183f 是 spm针对每个客户生成的,都不一样,你要复制自己的clientid )

-Dcom.sun.management.jmxremote -javaagent:/opt/spm/spm-monitor/lib/spm-monitor-solr.jar=07219029-28e9-4102-a7a9-aca1f356183f::default

5 还有很重要的一步 ,在solr中启用 jmx

在solrconf.xml中加入 <jmx/>

6, 重启 tomcat 即可,等待,大约 5分钟,即可看到 各种关于你solr和服务器的各种信息了,很好用。如下图




下面是常见问题的诊断(官方)https://sematext.atlassian.net/wiki/display/PUBSPM/SPM+FAQ

I rebooted my server and now I don't see any data in my graphs. What should I check?

A: Here are a few things to check and do:
  1. Make sure Collectd is running: sudo service collectd restart. Make sure Collectd is set up to start at boot.
  2. Make sure SPM Sender is running: sudo /etc/init.d/spm-sender restart
  3. Make sure disk is not full: df -h
  4. Make sure maximal open files limit was not reached: 

I registered for SPM more than 5 minutes ago and I don't see ANY of my data / I am getting errors when starting SPM Sender or Monitor, what should I check?

A: Here are a few things to check and do:
  1. Log into your monitored servers and make sure Collectd and SPM Sender are running.
  2. Check if system time is correct. If not, you should adjust the time, restart the SPM Sender with:
    sudo /etc/init.d/spm-sender restart

    and restart SPM Monitor by restarting your server which is being monitored (in case in-process/javaagent variant of SPM Monitor) or (in case of standalone SPM Monitor installation):

    sudo /etc/init.d/spm-monitor restart
  3. Make sure disks are not full.
  4. Make sure user spmsender can have more than 1024 files open:

    sudovim /etc/security/limits.conf
    spmsender     -    nofile    32000
     
    sudovim /etc/pam.d/su
    session    required   pam_limits.so

    Restart SPM Sender after the above changes.

  5. Check if hostname of your server is defined in /etc/hosts
  6. If you are starting your Jetty (or some other server) with command like "java ... -jar start.jar ..." and using inprocess (javaagent) version of monitor, make sure -D and -javaagent definitions occur before "-jar start.jar" part in your command
  7. If none of the suggestions helped, run bash /opt/spm/bin/spm-client-diagnostics.sh to generate diagnostics package and send it to spm-support@sematext.com


原创粉丝点击