batica memo

ちょっとしたコマンドや関数など、1つの記事にするほどでもないけど、調べたこととしてメモしておきたいものを書いていきます。
記事にする時間が無い時にメモとして書くこともあります。
後で記事にしたら消します。

所有者限定モードのためこのボードには投稿できません ボードとは?

【Zabbix】 Template OS Windows by Zabbix agentのサービス監視除外設定

https://note.com/nerone1024/n/ne8c695a5419b

### 変更前
^(?:|RemoteRegistry|MMCSS|gupdate|SysmonLog|clr_optimization_v.+|clr_optimization_v.+|sppsvc|gpsvc|Pml Driver HPZ12|Net Driver HPZ12|MapsBroker|IntelAudioService|Intel\(R\) TPM Provisioning Service|dbupdate|DoSvc)$

### 変更後
#### WpnUserServiceの除外
#### CDPUserServiceの除外
#### BITSの除外
^(?:(CDP|Wpn)User[_A-Za-z0-9]+|BITS|RemoteRegistry|MMCSS|gupdate|SysmonLog|clr_optimization_v.+|clr_optimization_v.+|sppsvc|gpsvc|Pml Driver HPZ12|Net Driver HPZ12|MapsBroker|IntelAudioService|Intel\(R\) TPM Provisioning Service|dbupdate|DoSvc)$

【Apache】server-statusをコマンドで出力する

Apache 2.4 server-status / server-info

[root]
$ watch -n 1 "wget -q http://127.0.0.1/server-status?auto -O -"

$ watch -n 1 "curl 'http://127.0.0.1/server-status?auto'"

【Zabbix】zabbixのホームディレクトリ

https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/db/mysql_agent?at=refs/heads/release/5.0

「Template DB MySQL by Zabbix agent」を使うために設定を行っている。

Create .my.cnf in the home directory of Zabbix agent for Linux (/var/lib/zabbix by default ) or my.cnf in c:\ for Windows. The file must have three strings:

デフォルトから変更した記憶が無いが、ホームディレクトリを確認する。

[root]
$ cat /etc/passwd | grep zabbix
zabbix:x:988:984:Zabbix Monitoring System:/var/lib/zabbix:/sbin/nologin

ホームディレクトリが無い。

[root]
$ ls -l /var/lib/zabbix
ls: '/var/lib/zabbix' にアクセスできません: そのようなファイルやディレクトリはありません

https://www.zabbix.com/forum/zabbix-troubleshooting-and-problems/403436-no-folder-var-lib-zabbix

Create the directory /var/lib/zabbix yourself. Permissions should be owned by the zabbix user and read/write by the zabbix user.

自分で作成すればよいらしい。

[root]
$ mkdir /var/lib/zabbix
$ chown zabbix:zabbix /var/lib/zabbix

【Zabbix】MySQLのパスワードを変更したらWeb GUI画面に入れなくなった

https://zabbix83.rssing.com/chan-59764673/article76.html
https://saw.hateblo.jp/entry/2019/03/28/183444

⇒mysqlのユーザに対するパスワード、/etc/zabbix/zabbix_server.confだけではなく、/etc/zabbix/web/zabbix.conf.phpにもパスワードが書かれるため変更する。

エラー内容

MySQL database "zabbix" on "localhost" is not available: Access denied for user 'zabbix'@'localhost' (using password: YES)

試験概要

午前I

応用情報技術者試験の午前問題から30問出題される。
試験対策としては、応用情報技術者試験の午前問題の過去問をひたすら解く。

Zabbix LLDエージェントサポート範囲

https://www.zabbix.com/documentation/3.0/manual/discovery/low_level_discovery

Low-level discovery items “vfs.fs.discovery” and “net.if.discovery” are supported since Zabbix agent version 2.0.
Discovery item “system.cpu.discovery” is supported since Zabbix agent version 2.4.
Discovery of SNMP OIDs is supported since Zabbix server and proxy version 2.0.
Discovery using ODBC SQL queries is supported since Zabbix server and proxy version 3.0.