This article describes an issue where events in the Network Director database grow and occupy huge disk space of Junos Space server.
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:
# service jmp-watchdog stop # service jboss stop # service jboss-dc stop
# mysql -ujboss -p$(grep mysql.jboss /etc/sysconfig/JunosSpace/pwd | awk -F= '{print $2}') # mysql> use build_db;
mysql> SET FOREIGN_KEY_CHECKS=0; mysql> TRUNCATE TABLE CMEvent; mysql> TRUNCATE TABLE CMEventAttributes; mysql> TRUNCATE TABLE CMAlarm; mysql> SET FOREIGN_KEY_CHECKS=1;
# service jmp-watchdog start
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.