1
0
mirror of https://github.com/ranl/monitor-utils.git synced 2024-11-05 15:43:44 +01:00
monitor-utils/zabbix/user_param/solr.conf
2013-12-02 15:24:24 +02:00

9 lines
913 B
Plaintext

############
### Solr ###
############
UserParameter=solr.ping[*],wget -q -O - --timeout=3 -t 1 $1/admin/ping 2> /dev/null | grep -c "<str name=\"status\">OK</str>"
UserParameter=solr.slave_up[*],wget -q -O - --timeout=3 -t 1 $1/admin/replication/index.jsp 2> /dev/null |grep -A 3 '<strong>Master</strong>' | tail -n 1 | sed 's/\s//g' | wc -l
UserParameter=solr.slave_index_behind_master[*],out=$(expr $(echo $( wget $1/admin/replication/index.jsp -q -O - --timeout=3 -t 1 2> /dev/null |grep 'Index Version:' | grep -v 'Latest' | awk '{print $$3}' | grep -E -o "[0-9]+") | sed 's/\ /\ -\ /g' )) ; [ -z "$out" ] && out=0 ; echo $out
UserParameter=solr.docs_indexing[*],docs=$(wget $1/dataimport -q -O - --timeout=3 -t 1 2> /dev/null | grep -o '<str name=\"Total Documents Processed\">[0-9]*</str>' | sed -e 's/<str name="Total Documents Processed">//g' -e 's/<\/str>//g') ; [ -z "$docs" ] && docs=0 ; echo $docs