To get the host names and port numbers with failing messages, and number of messages waiting in queue to be sent: SELECT TARGET_HOST, TARGET_PORT, COUNT(*) FROM =XMA_SYSLOGQ WHERE ALERTEDGMT = TIMESTAMP "1970-01-01:00:00:00.000000" GROUP BY TARGET_HOST, TARGET_PORT BROWSE ACCESS;
Replacing the = by > will return the counts of successfully sent messages by destination.
To delete not sent messages for a given destination: SQLCI> DELETE FROM =XMA_SYSLOGQ WHERE ALERTEDGMT = TIMESTAMP "1970-01-01:00:00:00.000000" AND TARGET_HOST = "192.168.1.123" AND TARGET_PORT = 514;
- To forward not sent messages from a given destination to a different one:
SQLCI> UPDATE =XMA_SYSLOGQ SET TARGET_HOST = "192.168.1.321", TARGET_PORT = 1514 WHERE ALERTEDGMT = TIMESTAMP "1970-01-01:00:00:00.000000" AND TARGET_HOST = "192.168.1.123" AND TARGET_PORT = 514;
To check throughput: Returns activity number from midnight of current day through the current time: SQLCI> SELECT MIN(entrygmt) , MAX(entrygmt) , MIN(alertedgmt), MAX(alertedgmt) , ENTRYGMT hour , ((JULIANTIMESTAMP(ENTRYGMT)/ 60000000) -(JULIANTIMESTAMP(ENTRYGMT)/3600000000)*60)/5 , COUNT(*) FROM =XMA_SYSLOGQ WHERE (PARTITIONKEY, ENTRYGMT, PART) >(2,(CURRENT YEAR TO DAY) YEAR TO FRACTION(6),0) GROUP BY 5, 6 BROWSE ACCESS;
Each record represents a 5 minute slice of time and contains the following columns:
- Timestamp of the first record?s insert into the SYSLOGQ table
- Timestamp of the last record?s insert into the SYSLOGQ table
- Timestamp of first record?s send
- Timestamp of last record?s send
- Hour ? can be ignored, it?s there for grouping of the records only
- Number of 5 minute slice within the hour ? can be ignored
- Number of records inserted into the SYSLOGQ table
Returns activity number for any time window (change timestamps as desired): SQLCI> SELECT MIN(entrygmt), MAX(entrygmt) , MIN(alertedgmt),MAX(alertedgmt) , ENTRYGMT hour , ((JULIANTIMESTAMP(ENTRYGMT)/ 60000000) -(JULIANTIMESTAMP(ENTRYGMT)/3600000000)*60)/5 , COUNT(*) FROM =XMA_SYSLOGQ WHERE (PARTITIONKEY, ENTRYGMT, PART) BETWEEN (2,(timestamp "2013-06-15:12:00:00.000000") YEAR TO FRACTION(6),0) AND (2,(timestamp "2013-06-17:23:59:59.999999") YEAR TO FRACTION(6),0) GROUP BY 5, 6 BROWSE ACCESS;
Each record represents a 5 minute slice of time and contains the following columns:
- Timestamp of the first record?s insert into the SYSLOGQ table
- Timestamp of the last record?s insert into the SYSLOGQ table
- Timestamp of first record?s send
- Timestamp of last record?s send
- Hour ? can be ignored, it?s there for grouping of the records only
- Number of 5 minute slice within the hour ? can be ignored
- Number of records inserted into the SYSLOGQ table
If this article did not provide a solution, please open a case with our support team by sending an email message to support@xypro.com.