Data Collection Issue for FI Log KPI in OOB Category
Data Collection Issue for FI Log KPI in OOB Category in Percona Issues.
Data Collection Issue for FI Log KPI in OOB Category#
Absence of data for the FI log KPI category in the UI. The issue was traced to the producer parameter not being updated in Percona.
Solution: Follow the below steps to rectify the issue:
- Initial Check: As part of the validation process, it is necessary to confirm that the logfile path provided was correct.
-
Producer Parameter Update: If the logfile path was not specified, execute the following query to update the producer parameter in Percona:
mysql> update producer_parameters set parameter_value ='/f10Profiles_NP/FENPHA/common/log/fsb/fsbhttp' where id=<rowid>; -
After the update of the producer parameter, data collection will commence successfully.
Issue with IHS Data Collection#
IHS data collection was not occurring due to an invalid protocol in the status URL.
Solution:
-
Protocol Attribute Update: Update the protocol attribute in the comp_instance_attribute_values table in Percona to include the correct protocol (http or https):
update comp_instance_attribute_values set attribute_value='http' where comp_instance_id=<>;
Password Encryption/Decryption for Percona DB#
When updating passwords in the Percona DB or creating SDMs, passwords should be in encrypted format.
Encryption/Decryption Format:
- Always use single quotes ('') for encrypting or decrypting passwords.
-
Example commands for encryption and decryption using the encryption tool are as below:
Encryption:
java -cp bcprov-jdk15on-1.54.jar:. EncryptionTool 'F@55sure$123'Decryption:
java -cp bcprov-jdk15on-1.54.jar:. EncryptionTool '<encrypted-password>=' decrypt
Unable to Start Percona Slave#
Encountered an error while attempting to start the Percona slave:
mysql> start slave user='replicator' password='<password>'
default_auth='mysql_native_password';
ERROR 1200 (HY000): The server is not configured as a slave; fix in
the config file or with CHANGE MASTER TO.
Solution:
To resolve this issue, set the value of the following Consul key to 1:
service/percona/replication/status
After making this adjustment, restart the Percona service and initiate the slave using the appropriate command.
Installing MySQL for Remote DB Restoration#
Activity: Example-SP2 DB Restoration
Procedure:
-
Verify Existing MySQL Versions or RPMs: Before installing, confirm if any MySQL versions or RPMs are already installed:
rpm -qa | grep MySQL | percona -
Install MySQL RPMs: Use the following command to install the MySQL RPMs:
rpm -ivh percona-server-server-8.0.23-14.1.el7.x86_64.rpmThe MySQL version being installed is from the file mysql_8.0.23_rpm_rhel7x.tar.gz.
Note: Ensure to validate the existing MySQL installations before proceeding with the installation. Adjust the command as needed based on the actual MySQL RPM file used.
Percona Nodes Sync Issue Resolution#
Percona Node 2 is not in sync with Node 1, leading to errors while checking the slave status.
Server Analysis: The issue is attributed to incorrect configurations in the my.cnf files on both Percona servers.
[healuser@dc-apm-db1 PERCONA]$ cat my.cnf | grep -i event_scheduler = 0
[healuser@dc-apm-db1 PERCONA]$ ssh 192.0.2.55
Activate the web console with: systemctl enable --now cockpit.socket
Register this system with Red Hat Insights: insights-client --
register
Create an account or view all your systems at
https://red.ht/insights-dashboard
Last login: Mon Sep 25 17:52:35 2023 from 192.0.2.23
[healuser@dc-apm-db2 ~]$ cd /heal/Example/Appsone_Service/conf/PERCONA
[healuser@dc-apm-db2 PERCONA]$ cat my.cnf | grep -i event_scheduler = 1
This misconfiguration appears to have existed prior to the upgrade, as evident from the backup of my.cnf files created during the upgrade installation.
Solution:
-
Execute Query on Node 2 MySQL: Execute the following query on Node 2's MySQL server.
stop slave; -
Stop Percona Service: Stop the Percona service on both nodes.
-
Update event_scheduler in my.cnf Files:
-
Update event_scheduler to 1 in the my.cnf file on Node 1 server (192.0.2.11) located in below directory.
/heal/<user folder>/Appsone_Service/conf/PERCONA -
Update event_scheduler to 0 in the my.cnf file on Node 2 server (192.0.2.31) located in below directory.
/heal/<user folder>/Appsone_Service/conf/PERCONA
-
-
Start Percona Service: Start the Percona service using the Nomad command.
-
Start Replication in Percona Node 2 MySQL: Execute the following queries to start replication in Percona Node 2's MySQL.
RESET SLAVE; SET GLOBAL sql_slave_skip_counter = 1; START SLAVE;If errors persist, perform a Percona dump from the master and import it into the slave. Subsequently, start replication, and verify its functionality.
Log Rotation Policy for Percona at Logrotate#
The log rotation policy is not functioning correctly for Percona (MySQL logs).
Solution:
Follow the below steps to resolve the issue:
-
Verify the Percona Logrotate File:
-
Navigate to the below directory,
/etc/logrotate.d/and check if the percona.logrotate file exists.
-
If the file is not present, create it using the following steps:
- Create the Logrotate Configuration File:
cd /etc/logrotate.d/ touch percona.logrotate vim percona.logrotate -
-
Add the Log Rotation Configuration:
Open the percona.logrotate file in a text editor and add the following content:
<percona_audit_logpath>/audit.log <percona_log_path>/*.log { daily missingok rotate 7 compress delaycompress copytruncate notifempty create 600 root maxsize 200M dateformat -%Y%m%d dateext }-
Replace <percona_audit_logpath> with the actual audit log path for Percona.
-
Replace <percona_log_path> with the path to mysql.log and mysql_error.log .
- Check Log Rotation: Execute the following command to verify the log rotation configuration:
logrotate -f -v /etc/logrotate.d/percona.logrotate -