Query per la tabella Syslog

Per informazioni sull'uso di queste query nella portale di Azure, vedere Esercitazione su Log Analytics. Per l'API REST, vedere Query.

Find Linux kernel events

Find events reported by Linux kernel process, regarding killed processes.

// To create an alert for this query, click '+ New alert rule'
Syslog
| where ProcessName == "kernel" and SyslogMessage contains "Killed process"

Tutti i syslog

Ultimi 100 Syslog.

Syslog 
| top 100 by TimeGenerated desc

Tutti i syslog con errori

Ultimi 100 Syslog con erros.

Syslog 
| where SeverityLevel == "err" or  SeverityLevel == "error"
| top 100 by TimeGenerated desc

Tutti i syslog per funzionalità

Tutte le funzionalità syslog.

Syslog 
| summarize count() by Facility

Tutti i syslog in base al nome del processo

Tutto Syslog in base al nome del processo.

Syslog 
| summarize count() by ProcessName

Utenti aggiunti al gruppo Linux per computer

Elenca i computer con gli utenti aggiunti al gruppo Linux.

Syslog
| where Facility == 'authpriv' and SyslogMessage has 'to group' and (SyslogMessage has 'add' or SyslogMessage has 'added')
| summarize by Computer

Nuovo gruppo Linux creato dal computer

Elenca i computer con il nuovo gruppo Linux creato.

Syslog
| where Facility == 'authpriv' and SyslogMessage has 'new group'
| summarize count() by Computer

Modifica della password utente Linux non riuscita

Elenca i computer che non hanno superato la modifica della password utente linux.

Syslog
| where Facility == 'authpriv' and ((SyslogMessage has 'passwd:chauthtok' and SyslogMessage has 'authentication failure') or SyslogMessage has 'password change failed')
| summarize count() by Computer

Computer con accessi SSH non riusciti

Elenca i computer con accessi SSH non riusciti.

Syslog
| where (Facility == 'authpriv' and SyslogMessage has 'sshd:auth' and SyslogMessage has 'authentication failure') or (Facility == 'auth' and ((SyslogMessage has 'Failed' and SyslogMessage has 'invalid user' and SyslogMessage has 'ssh2') or SyslogMessage has 'error: PAM: Authentication failure'))
| summarize count() by Computer

Computer con accessi non riusciti

Elenca i computer con accessi non riusciti.

Syslog
| where (Facility == 'authpriv' and SyslogMessage has 'su:auth' and SyslogMessage has 'authentication failure') or (Facility == 'auth' and SyslogMessage has 'FAILED SU')
| summarize count() by Computer

Computer con accessi sudo non riusciti

Elenca i computer con accessi sudo non riusciti.

Syslog
| where (Facility == 'authpriv' and SyslogMessage has 'sudo:auth' and (SyslogMessage has 'authentication failure' or SyslogMessage has 'conversation failed')) or ((Facility == 'auth' or Facility == 'authpriv') and SyslogMessage has 'user NOT in sudoers')
| summarize count() by Computer