Description

This article describes an issue where events in the Network Director database grow and occupy huge disk space of Junos Space server.
 

Symptoms

  • 'MySQL Tables exceeded the size limit (>10GB)'  shows in Junos Space Dashboard
  • Due to /var being 100% the Junos space GUI is not accessible

Solution

To confirm which table is occupying the maximum size you can check the below command in CLI of Junos space:

# mysql -ujboss -p$(grep mysql.jboss /etc/sysconfig/JunosSpace/pwd | awk -F= '{print $2}') -e 'SELECT TABLE_NAME, TABLE_SCHEMA, table_rows, data_length, index_length, round(((data_length + index_length) / 1024 / 1024),2) "Size in MB" FROM information_schema.TABLES WHERE table_schema = "build_db" ORDER BY round(((data_length + index_length) / 1024 / 1024),2) DESC LIMIT 10;' 


After executing the command you can confirm which table is occupying more and if CMEvent, CMEventAttributes,CMAlarm are occupying more then you can proceed with the below steps:
 

  1. Take a backup of the current database.
  2. Stop the Jboss service using the below commands.
 
# service jmp-watchdog stop
# service jboss stop
# service jboss-dc stop
 
  1. Entering into MySQL DB
# mysql -ujboss -p$(grep mysql.jboss /etc/sysconfig/JunosSpace/pwd | awk -F= '{print $2}')
# mysql> use build_db;
 
  1. Truncating the table.
mysql> SET FOREIGN_KEY_CHECKS=0;
mysql> TRUNCATE TABLE CMEvent;
mysql> TRUNCATE TABLE CMEventAttributes;
mysql> TRUNCATE TABLE CMAlarm;
mysql> SET FOREIGN_KEY_CHECKS=1;
 
  1. Starting the Jboss service.
# service jmp-watchdog start

 

  1. After jboss started follow the below steps.

1. Login to Network Director

2. Go to Preference > Fault > Additional setting

3. Modify the Number of Days to keep the alarm and Event/Alarm to 10

4. Click Ok.

 

Modification History

2024-03-01 : Article Created
2024-08-07: Minor edits and formatting and changing the visibility.

Related Information

https://www.juniper.net/documentation/us/en/software/network-director5.2/release-note/5.2/nd-5.2-release-note/topics/concept/known-behavior.html