I am having difficulty with the correct syntax to pull out specific host information for my slow query log file:
I am using the following:
sudo pt-query-digest mysql-slow.log --since "2017-05-07 22:00:00" --until "2017-05-08 22:00:00" --filter ‘$event->{host} !~ m/^ip-1-1-1-1/’ > slow.log
In this scenario, I am trying to exclude all IP addresses that are 1.1.1.1. I can’t understand what happened.
Use ascii quote ('), not this non-ascii quote (');
Assuming that m/^ip-1-1-1-1/works, it will capture both ip-1-1-1-1, and ip-1-1-1-123. Therefore, you may need something to interrupt ip. Maybe,m/^ip-1-1-1-1$/
m/^ip-1-1-1-1/
ip-1-1-1-1
ip-1-1-1-123
m/^ip-1-1-1-1$/
arg , ( ) $event , {...} - !~ .
$event
{...}
!~
Source: https://habr.com/ru/post/1017090/More articles:How to read HTTP / 2 push frames from a net / http - goRMSE / RMSLE loss function in Keras - pythonSDL2 & GDB: software received signal ?, Unknown signal - c ++.NET Source code crash on constructor? .Invoke () (empty pass) - reflectionIncorrect warning from Xcode 8.3.2: Not portable file path, the specified path is different in the case of a file name on disk - c ++Преобразование CSS без преобразования его содержимого - htmlCompare the 32-bit float and the 32-bit integer without casting twice, when any value can be too large to exactly match another type - c ++Using @RequestBody and forwarding to another endpoint throws an exception. Drain closed - javaSpring 3.2 forward query with new object - springApplicationContext events have never been thrown - javaAll Articles