Bonjour à tous !!
Logcheck me génère de fausses alertes:
1 2 3 4
| Mar 2 13:23:52 Server dhcpd: DHCPREQUEST for 10.0.6.248 from 00:1c:23:85:64:cf (Hostname Unsuitable for Printing) via eth2
Mar 2 13:23:52 Server dhcpd: DHCPACK on 10.0.6.248 to 00:1c:23:85:64:cf (Hostname Unsuitable for Printing) via eth2
Mar 2 13:59:48 Server dhcpd: DHCPREQUEST for 10.0.6.225 from 00:16:d4:54:ef:9c (Hostname Unsuitable for Printing) via eth2
Mar 2 13:59:48 Server dhcpd: DHCPACK on 10.0.6.225 to 00:16:d4:54:ef:9c (Hostname Unsuitable for Printing) via eth2 |
J'ai essaye de bricoler un regexp:
1 2
| ^\w{3} [ :0-9]{11} [._[:alnum:]-]+ dhcpd: DHCPREQUEST for [.0-9]{7,15} from [:[:alnum:]]+ (\([._[:alnum:]-]+[[:space:]]\) |)via [.[:alnum:]]+$
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ dhcpd: DHCPACK on [.0-9]{7,15} to [:[:alnum:]]+ (\([._[:alnum:]-]+\) |)via [.[:alnum:]]+$ |
Mais ça ne fonctionne pas, je pense que c'est le:
(\([._[:alnum:]-]+[[:space:]]\) |)
qui ne va pas à cause des espaces.
Pour tester si le script fonctionne j'utilise:
egrep -f <fichier regexp> <fichier à regexper>
Que manque -t-il ?
Merci d'avance !
RedVivi
Partager