Nagios, now known as Nagios Core, is a free and open source computer-software application that monitors systems, networks and infrastructure. Nagios offers monitoring and alerting services for servers, switches, applications and services. It alerts users when things go wrong and alerts them a second time when the problem has been resolved.
Step 1: Navigate to $JBOSS_Home/bin and edit standalone.conf.bat
Step 2: Add below configuration on standalone.conf.bat file.
****************************************
set "JAVA_OPTS=%JAVA_OPTS% -Xbootclasspath/p:D:\JBOSS\jboss-as-7.1.1.Final\modules\org\jboss\logmanager\main\jboss-logmanager-1.2.2.GA.jar -Xbootclasspath/p:D:\JBOSS\jboss-as-7.1.1.Final\modules\org\jboss\logmanager\log4j\main\jboss-logmanager-log4j-1.0.0.GA.jar -Xbootclasspath/p:D:\JBOSS\jboss-as-7.1.1.Final\modules\org\apache\log4j\main\log4j-1.2.16.jar"
set "JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
set "JAVA_OPTS=%JAVA_OPTS% -Djboss.modules.system.pkgs=org.jboss.byteman,org.jboss.logmanager"
set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"
set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.port=9002"
set "JAVA_OPTS=%JAVA_OPTS% -Djava.rmi.server.hostname=192.168.XXX.XXX"
****************************************
Step 3: Restart the JBoss.
Step 4: Provide below document to IT-Team/Server Team, to install the check_jmx plugin & jmxquery.jar on Nagios (libraries) /usr/local/nagios/libexec/
Document URL : https://assets.nagios.com/downloads/nagiosxi/docs/Monitoring-JMX-with-Nagios-XI.pdf
Step 5 : Provide below nagios commands to IT-Team for configuration on Nagios tool console.
********************************************
./check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.199.177:9002/jmxrmi -O java.lang:type=Threading -A ThreadCount -w 450 -c 550
## Heap memory used## warning 5GB to critical 6.5 GB
./check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.199.177:9002/jmxrmi -O java.lang:type=Memory -A HeapMemoryUsage -K used -I HeapMemoryUsage -J used -vvvv -w 5098760192 -c 6598760192
## NON-heap memory usage## warning 1GB to critical 1.5 GB
./check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.199.177:9002/jmxrmi -O java.lang:type=Memory -A NonHeapMemoryUsage -K used -I NonHeapMemoryUsage -J used -vvvv -w 1073741824 -c 1500000000
## DaemonThreadCount ## warning 100 to critical 250
./check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.199.177:9002/jmxrmi -O java.lang:type=Threading -A DaemonThreadCount -w 100 -c 250
## SystemLoadAverage ## warning 70 to critical 90
./check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.199.177:9002/jmxrmi -O java.lang:type=OperatingSystem -A SystemLoadAverage -w 70 -c 90
## LoadedClassCount ##
./check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.199.177:9002/jmxrmi -O java.lang:type=ClassLoading -A LoadedClassCount -K used
## LastGcInfo -K duration ## Returns the elapsed time of this GC in milliseconds
./check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.199.177:9002/jmxrmi -O java.lang:type=GarbageCollector,name=ParNew -A LastGcInfo -K duration7220
## CollectionTime for ConcurrentMarkSweep ## collect the GC time in milliseconds
./check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.199.177:9002/jmxrmi -O java.lang:type=GarbageCollector,name=ConcurrentMarkSweep -A CollectionTime
## CollectionCount for ConcurrentMarkSweep ## total numbers of time GC collected
./check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.199.177:9002/jmxrmi -O java.lang:type=GarbageCollector,name=ConcurrentMarkSweep -A CollectionCount
## CollectionCount for ParNew ## total numbers of time GC collected
./check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.199.177:9002/jmxrmi -O java.lang:type=GarbageCollector,name=ParNew -A CollectionCount
## CollectionTime for ParNew ## collect the GC time in milliseconds
./check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.199.177:9002/jmxrmi -O java.lang:type=GarbageCollector,name=ParNew -A CollectionTime
############################
############################
./check_ajp -app 192.168.199.177 --port 8009 --warn 1 --crit 2 --timeout 5
./check_website.sh 192.168.199.177:8080/MiddlewareBox/login.jsp
############################
Screenshot:
Thanks :-)
Step 1: Navigate to $JBOSS_Home/bin and edit standalone.conf.bat
Step 2: Add below configuration on standalone.conf.bat file.
****************************************
set "JAVA_OPTS=%JAVA_OPTS% -Xbootclasspath/p:D:\JBOSS\jboss-as-7.1.1.Final\modules\org\jboss\logmanager\main\jboss-logmanager-1.2.2.GA.jar -Xbootclasspath/p:D:\JBOSS\jboss-as-7.1.1.Final\modules\org\jboss\logmanager\log4j\main\jboss-logmanager-log4j-1.0.0.GA.jar -Xbootclasspath/p:D:\JBOSS\jboss-as-7.1.1.Final\modules\org\apache\log4j\main\log4j-1.2.16.jar"
set "JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
set "JAVA_OPTS=%JAVA_OPTS% -Djboss.modules.system.pkgs=org.jboss.byteman,org.jboss.logmanager"
set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"
set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.port=9002"
set "JAVA_OPTS=%JAVA_OPTS% -Djava.rmi.server.hostname=192.168.XXX.XXX"
****************************************
Step 3: Restart the JBoss.
Step 4: Provide below document to IT-Team/Server Team, to install the check_jmx plugin & jmxquery.jar on Nagios (libraries) /usr/local/nagios/libexec/
Document URL : https://assets.nagios.com/downloads/nagiosxi/docs/Monitoring-JMX-with-Nagios-XI.pdf
Step 5 : Provide below nagios commands to IT-Team for configuration on Nagios tool console.
********************************************
./check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.199.177:9002/jmxrmi -O java.lang:type=Threading -A ThreadCount -w 450 -c 550
## Heap memory used## warning 5GB to critical 6.5 GB
./check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.199.177:9002/jmxrmi -O java.lang:type=Memory -A HeapMemoryUsage -K used -I HeapMemoryUsage -J used -vvvv -w 5098760192 -c 6598760192
## NON-heap memory usage## warning 1GB to critical 1.5 GB
./check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.199.177:9002/jmxrmi -O java.lang:type=Memory -A NonHeapMemoryUsage -K used -I NonHeapMemoryUsage -J used -vvvv -w 1073741824 -c 1500000000
## DaemonThreadCount ## warning 100 to critical 250
./check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.199.177:9002/jmxrmi -O java.lang:type=Threading -A DaemonThreadCount -w 100 -c 250
## SystemLoadAverage ## warning 70 to critical 90
./check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.199.177:9002/jmxrmi -O java.lang:type=OperatingSystem -A SystemLoadAverage -w 70 -c 90
## LoadedClassCount ##
./check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.199.177:9002/jmxrmi -O java.lang:type=ClassLoading -A LoadedClassCount -K used
## LastGcInfo -K duration ## Returns the elapsed time of this GC in milliseconds
./check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.199.177:9002/jmxrmi -O java.lang:type=GarbageCollector,name=ParNew -A LastGcInfo -K duration7220
## CollectionTime for ConcurrentMarkSweep ## collect the GC time in milliseconds
./check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.199.177:9002/jmxrmi -O java.lang:type=GarbageCollector,name=ConcurrentMarkSweep -A CollectionTime
## CollectionCount for ConcurrentMarkSweep ## total numbers of time GC collected
./check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.199.177:9002/jmxrmi -O java.lang:type=GarbageCollector,name=ConcurrentMarkSweep -A CollectionCount
## CollectionCount for ParNew ## total numbers of time GC collected
./check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.199.177:9002/jmxrmi -O java.lang:type=GarbageCollector,name=ParNew -A CollectionCount
## CollectionTime for ParNew ## collect the GC time in milliseconds
./check_jmx -U service:jmx:rmi:///jndi/rmi://192.168.199.177:9002/jmxrmi -O java.lang:type=GarbageCollector,name=ParNew -A CollectionTime
############################
############################
./check_ajp -app 192.168.199.177 --port 8009 --warn 1 --crit 2 --timeout 5
./check_website.sh 192.168.199.177:8080/MiddlewareBox/login.jsp
############################
Screenshot:
Thanks :-)
No comments:
Post a Comment