Azure portal でこれらのクエリを使用する方法については、 Log Analytics のチュートリアルを参照してください。 REST API については、「 Query」を参照してください。
Linux カーネル イベントを検索する
終了されたプロセスに関する、Linuxカーネルプロセスによって報告されたイベントを見つけます。
// To create an alert for this query, click '+ New alert rule'
Syslog
| where ProcessName == "kernel" and SyslogMessage contains "Killed process"
すべての Syslog
最後の 100 個の Syslog。
Syslog
| top 100 by TimeGenerated desc
エラーを含むすべての Syslog
最近の100件のSyslog(エラーが含まれているもの)。
Syslog
| where SeverityLevel == "err" or SeverityLevel == "error"
| top 100 by TimeGenerated desc
施設別のすべての Syslog
施設別のすべての Syslog。
Syslog
| summarize count() by Facility
プロセス名別のすべての Syslog
プロセス名別のすべての Syslog。
Syslog
| summarize count() by ProcessName
コンピューターによって Linux グループに追加されたユーザー
ユーザーが Linux グループに追加されたコンピューターを一覧表示します。
Syslog
| where Facility == 'authpriv' and SyslogMessage has 'to group' and (SyslogMessage has 'add' or SyslogMessage has 'added')
| summarize by Computer
コンピューターによって作成された新しい Linux グループ
新しい Linux グループが作成されたコンピューターを一覧表示します。
Syslog
| where Facility == 'authpriv' and SyslogMessage has 'new group'
| summarize count() by Computer
失敗した Linux ユーザー パスワードの変更
失敗した 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
Ssh ログオンに失敗したコンピューター
失敗した ssh ログオンを持つコンピューターを一覧表示します。
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
Su ログオンに失敗したコンピューター
su ログオンに失敗したコンピューターを一覧表示します。
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
Sudo ログオンに失敗したコンピューター
sudo ログオンが失敗したコンピューターを一覧表示します。
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