snmp/sshで情報収集する。
無料のCommunity版の他、有料のProfessional版やEnterprise版があり、使用できる機能が異なる。
紹介
https://www.ossl.co.jp/?page_id=254
https://www.io-architect.com/wp/service/openaudit.html
マニュアル
https://community.opmantek.com/display/OA/Home
公式ページ
https://www.open-audit.org/index.php
過去バージョンのダウンロード
リンクは無いので、リリースノートを確認してURLを変える
http://dl-openaudit.opmantek.com/OAE-Linux-x86_64-release_2.2.7.run
- 参考
現在はインストーラー形式でしか配布されておらず、手動でのビルド、インストールはできない
ソースコード
https://github.com/Opmantek/open-audit
SELinuxは無効化しておく必要がある
sed "s/^SELINUX=enforcing/SELINUX=disabled/" -i /etc/selinux/config reboot
curl -s -O http://dl-openaudit.opmantek.com/OAE-Linux-x86_64-release_2.2.7.run
sh ./OAE-Linux-x86_64-release_2.2.7.run -t <インストールパス>
対話式なので、エンターを押すか-yオプションを付けて実行する
下記がインストールされる
- mariadb-server
- httpd
- php
- php-cli
- php-mysql
- php-ldap
- php-mbstring
- php-mcrypt
- php-process
- php-snmp
- php-xml
- nmap
- zip
- curl
- wget
- sshpass
- screen
- samba-client
- logrotate
- perl-Time-ParseDate
- ipmitool
- rrdtool
- libpng12
インストールパス
/usr/local/omk/
設定ファイルパス
/usr/local/omk/conf/
cron、logrotateの設定が自動でされる
自動でインストールされるmariadbのrootユーザパスワードは”openauditrootuserpassword”になる
起動
systemctl start omkd
停止
systemctl stop omkd
ブラウザでインストールしたサーバにアクセスする
http://<IPアドレス>/
「Open-AudIT Enterprise」と「Open-AudIT」のリンクがあるので、「Open-AudIT」の方をクリックする
管理対象の機器が20台以下なら、下記機能が使えるEnterprise無料版でも良い。
- Interactive Dashboard
- Geographical Maps
- Scheduling – discovery and reporting
- Enhanced Reports including Time based, Historical and Multi
画面上部のメニューバーからOpen-AudIT自体の設定やアカウント設定などを行える
日本語化はできない
無料(Community)版では使用できないメニューには錠マークが表示され、クリックできない
- Admin > Configuration > List Configuration
- “default_network_address”を開く
- Valueにサーバで使用するIPアドレスに変更する
Contents
- 1 管理画面
- 1.1 Configuration
- 1.1.1 access_token_count
- 1.1.2 access_token_enable
- 1.1.3 blessed_subnets_use
- 1.1.4 collector_check_minutes
- 1.1.5 database_show_row_limit
- 1.1.6 decrypt_credentials
- 1.1.7 default_network_address
- 1.1.8 delete_noncurrent
- 1.1.9 delete_noncurrent_netstat
- 1.1.10 delete_noncurrent_variable
- 1.1.11 discovery_create_alerts
- 1.1.12 discovery_ip_exclude
- 1.1.13 discovery_linux_script_directory
- 1.1.14 discovery_linux_script_permissions
- 1.1.15 discovery_linux_use_sudo
- 1.1.16 discovery_sunos_use_sudo
- 1.1.17 discovery_use_dns
- 1.1.18 discovery_use_ipmi
- 1.1.19 display_version
- 1.1.20 download_reports
- 1.1.21 graph_days
- 1.1.22 gui_trim_characters
- 1.1.23 homepage
- 1.1.24 internal_version
- 1.1.25 log_level
- 1.1.26 log_retain_level_0
- 1.1.27 log_retain_level_1
- 1.1.28 log_retain_level_2
- 1.1.29 log_retain_level_3
- 1.1.30 log_retain_level_4
- 1.1.31 log_retain_level_5
- 1.1.32 log_retain_level_6
- 1.1.33 log_retain_level_7
- 1.1.34 maps_api_key
- 1.1.35 maps_url
- 1.1.36 match_dbus
- 1.1.37 match_fqdn
- 1.1.38 match_hostname
- 1.1.39 match_hostname_dbus
- 1.1.40 match_hostname_serial
- 1.1.41 match_hostname_uuid
- 1.1.42 match_ip
- 1.1.43 match_mac
- 1.1.44 match_mac_vmware
- 1.1.45 match_serial
- 1.1.46 match_serial_type
- 1.1.47 match_uuid
- 1.1.48 modules
- 1.1.49 nmis
- 1.1.50 nmis_url
- 1.1.51 oae_license
- 1.1.52 oae_product
- 1.1.53 oae_prompt
- 1.1.54 oae_url
- 1.1.55 output_escape_csv
- 1.1.56 page_size
- 1.1.57 process_netstat_windows_dns
- 1.1.58 rss_enable
- 1.1.59 rss_url
- 1.1.60 servers
- 1.1.61 server_ip
- 1.1.62 uuid
- 1.2 Attributes
- 1.3 デバイス(ノード)の管理
- 1.4 カスタムフィールド
- 1.5 レポート
- 1.1 Configuration
管理画面
Configuration
access_token_count
Allow this many access tokens to be stored in the cookie.
- デフォルト
20
- タイプ
number
access_token_enable
Should we enable access tokens for CSRF mitigation.
- デフォルト
y
- タイプ
bool
blessed_subnets_use
Should we only accept data from the blessed subnets list.
- デフォルト
y
- タイプ
bool
collector_check_minutes
The default check interval for collectors.
- デフォルト
15
- タイプ
number
database_show_row_limit
The limit of rows to show, rather than download when exporting a database table.
- デフォルト
1000
- タイプ
number
decrypt_credentials
When we display or export credentials, should we decrypt them.
- デフォルト
y
- タイプ
bool
default_network_address
The ip address or resolvable hostname used by external devices to talk to Open-AudIT.
- デフォルト
なし
- タイプ
text
delete_noncurrent
Should we delete any attributes that are not present when we audit a device.
- デフォルト
n
- タイプ
bool
delete_noncurrent_netstat
Should we store non-current netstat data and generate change logs.
- デフォルト
y
- タイプ
bool
delete_noncurrent_variable
Should we store non-current environment variable data and generate change logs.
- デフォルト
y
- タイプ
bool
discovery_create_alerts
Should Open-AudIT create an entry in the alert table if a change is detected.
- デフォルト
y
- タイプ
bool
discovery_ip_exclude
Populate this list with ip addresses to be excluded from discovery. IPs should be separated by a space.
- デフォルト
なし
- タイプ
text
discovery_linux_script_directory
The directory the script is copied into on the target device.
- デフォルト
/tmp/
- タイプ
text
discovery_linux_script_permissions
The permissions set on the audit_linux.sh script when it is copied to the target device.
- デフォルト
700
- タイプ
text
discovery_linux_use_sudo
When running discovery commands on a Linux target, should we use sudo.
- デフォルト
y
- タイプ
bool
discovery_sunos_use_sudo
When running discovery commands on a SunOS target, should we use sudo.
- デフォルト
y
- タイプ
bool
discovery_use_dns
Should we use DNS for looking up the hostname and domain.
- デフォルト
y
- タイプ
bool
discovery_use_ipmi
Should we use ipmitool for discovering management ports if ipmitool is installed.
- デフォルト
y
- タイプ
bool
display_version
The version shown on the web pages.
- デフォルト
2.2.6
- タイプ
text
download_reports
Tells Open-AudIT to advise the browser to download as a file or display the csv, xml, json reports. Valid values are download and display.
- デフォルト
download
- タイプ
text
graph_days
The number of days to report on for the Enterprise graphs.
- デフォルト
30
- タイプ
number
gui_trim_characters
When showing a table of information in the web GUI, replace characters greater than this with “…”.
- デフォルト
25
- タイプ
number
homepage
Any links to the default page should be directed to this endpoint.
- デフォルト
groups
- タイプ
text
internal_version
The internal numerical version.
- デフォルト
20180710
- タイプ
number
log_level
Tells Open-AudIT which severity of event (at least) should be logged.
- デフォルト
5
- タイプ
number
log_retain_level_0
Tells Open-AudIT how many days to keep logs with severity 0.
- デフォルト
180
- タイプ
number
log_retain_level_1
Tells Open-AudIT how many days to keep logs with severity 1.
- デフォルト
180
- タイプ
number
log_retain_level_2
Tells Open-AudIT how many days to keep logs with severity 2.
- デフォルト
180
- タイプ
number
log_retain_level_3
Tells Open-AudIT how many days to keep logs with severity 3.
- デフォルト
180
- タイプ
number
log_retain_level_4
Tells Open-AudIT how many days to keep logs with severity 4.
- デフォルト
180
- タイプ
number
log_retain_level_5
Tells Open-AudIT how many days to keep logs with severity 5.
- デフォルト
90
- タイプ
number
log_retain_level_6
Tells Open-AudIT how many days to keep logs with severity 6.
- デフォルト
30
- タイプ
number
log_retain_level_7
Tells Open-AudIT how many days to keep logs with severity 7.
- デフォルト
7
- タイプ
number
maps_api_key
The API key for Google Maps.
- デフォルト
なし
- タイプ
text
maps_url
The web server address of opMaps.
- デフォルト
/omk/open-audit/map
- タイプ
text
match_dbus
Should we match a device based on its dbus id.
- デフォルト
n
- タイプ
bool
match_fqdn
Should we match a device based on its fqdn.
- デフォルト
y
- タイプ
bool
match_hostname
Should we match a device based only on its hostname.
- デフォルト
y
- タイプ
bool
match_hostname_dbus
Should we match a device based on its hostname and dbus id.
- デフォルト
y
- タイプ
bool
match_hostname_serial
Should we match a device based on its hostname and serial.
- デフォルト
y
- タイプ
bool
match_hostname_uuid
Should we match a device based on its hostname and UUID.
- デフォルト
y
- タイプ
bool
match_ip
Should we match a device based on its ip.
- デフォルト
n
- タイプ
bool
match_mac
Should we match a device based on its mac address.
- デフォルト
n
- タイプ
bool
match_mac_vmware
Should we match a device based mac address even if its a known likely duplicate from VMware.
- デフォルト
n
- タイプ
bool
match_serial
Should we match a device based on its serial number.
- デフォルト
y
- タイプ
bool
match_serial_type
Should we match a device based on its serial and type.
- デフォルト
y
- タイプ
bool
match_uuid
Should we match a device based on its UUID.
- デフォルト
y
- タイプ
bool
modules
The list of installed Opmantek modules.
- デフォルト
なし
- タイプ
text
nmis
Enable import / export to NMIS functions.
- デフォルト
n
- タイプ
bool
nmis_url
The web server address of NMIS.
- デフォルト
なし
- タイプ
text
oae_license
License status of Open-AudIT Enterprise.
- デフォルト
なし
- タイプ
text
oae_product
The name of the installed commercial application.
- デフォルト
Open-AudIT Community
- タイプ
text
oae_prompt
Prompt to activate a license for Open-AudIT Enterprise.
- デフォルト
2015-06-01
- タイプ
date
oae_url
The web server address of Open-AudIT Enterprise.
- デフォルト
/omk/open-audit
- タイプ
text
output_escape_csv
Escape CSV output so Excel will not attempt to run contents.
- デフォルト
y
- タイプ
bool
page_size
The default limit of rows to retrieve.
- デフォルト
1000
- タイプ
number
process_netstat_windows_dns
Should we keep track of Windows netstat ports used by DNS above port 1000.
- デフォルト
n
- タイプ
bool
rss_enable
Enable the RSS feed.
- デフォルト
y
- タイプ
bool
rss_url
The RSS feed URL.
- デフォルト
https://community.opmantek.com/rss/OA.xml
- タイプ
text
servers
The servers to report to when using Agent / Collector / Server.
- デフォルト
なし
- タイプ
text
server_ip
The locally detected IP Addresses of this server.
- デフォルト
なし
- タイプ
text
uuid
The unique identfier of this Open-AudIT server.
- デフォルト
なし
- タイプ
text
Attributes
https://community.opmantek.com/display/OA/Attributes
デバイス(ノード)の管理
デバイス(ノード)の登録
Linuxの場合、詳細な情報の登録にはrootユーザで収集するか、パスワード無しのsudo権限が必要である。
dmidecodeコマンドやnetstatコマンドを使用するからである。
単一のデバイスの登録
参考
- Discover > Discoveries > Discover a single device
- 登録対象の情報を入力する
- Device IP Address
対象ノードのIPアドレスかホスト名を入力する
IPアドレスの場合でも/32を書く必要はない - Network Address
Open-AudITサーバ自身を選択する。
このURLに対象デバイスから情報収集スクリプトがアクセスして情報登録するので、デバイスからアクセス可能でなければならない。 - Assign devices to Org (任意)
登録する「組織」を選択する - Assign devices to Location (任意)
登録する「場所を選択する - 収集方法
- Windows WMI
- Windows Username
- Windows Password
- Linux SSH
- SSH Username
ログインするデバイスのユーザ名を入力する。 - SSH Password
ログインするデバイスのパスワードを入力する。
公開鍵認証を使用する場合などでパスワードが不要な場合は空白のままでよい。
- SSH Username
- SNMP Community (v1)
コミュニティ名を入力する - SNMP Community (v2)
コミュニティ名を入力する
- Windows WMI
- Executeボタンをクリックする
- Device IP Address
- Manage > Devices > List Devices
登録されていることを確認する
なお、SSHの場合はサーバで次のようなコマンドを実行してデバイス登録を行っている。
nohup /usr/local/open-audit/other/discover_subnet.sh subnet_range=<デバイスIPアドレス> \ url=http://<Open-AudITサーバのIPアドレス>/open-audit/index.php/input/discoveries \ submit_online=y echo_output=n create_file=n debugging=0 discovery_id=XXX > /dev/null 2>&1 &
複数デバイスの登録
複数デバイスの登録の場合、SNMPを使用できないホストは登録のみ行われ、情報収集は別途SSH情報などを入力する必要がある
参考
- Discover > Credentials > Create Credentials
- ログイン情報を入力する
- Submit
- Discover > Discoveries > Create Discovery
- 登録対象の情報を入力する
- Name
管理名を入力する - Network Address
Open-AudITサーバ自身を選択する。
このURLに対象デバイスから情報収集スクリプトがアクセスして情報登録するので、デバイスからアクセス可能でなければならない。 - Subnet
探索したいネットワークアドレスを入力する
- Name
- Submitボタンをクリックして保存する
- Executeボタンをクリックして探索を実行する
- Execute部分がRefleshボタンからExecuteボタンに変わるまで何度かクリックする
- Manage > Devices > List Devices
登録されていることを確認する
※実行完了後も反映に時間がかかる
なお、サーバで次のようなコマンドを実行してデバイス登録を行っている。
nohup /usr/local/open-audit/other/discover_subnet.sh subnet_range=<ネットワークアドレス> \ url=http://<Open-AudITサーバのIPアドレス>/open-audit/index.php/input/discoveries \ submit_online=y echo_output=n create_file=n debugging=0 discovery_id=XXX > /dev/null 2>&1 &
デバイス(ノード)の削除
登録されたデバイスを削除する場合は次の操作を行う
- Manage > Devices > List Devices
- 対象のデバイスを開く
- “Status”の値を”Deleted”に変更して保存する
- 一定時間後に削除されるので待つ
- Admin > Database > List Tables
- “system”テーブルを開く
- “Device Status: deleted”欄のごみ箱ボタンをクリックする
カスタムフィールド
カスタムフィールドとはデバイスに追加する管理情報のことである。
任意の情報を管理できるが、値の取得は手動記入か別途収集方法を用意する必要がある。
Web APIが使用可能なので、Web APIを使用して登録が可能。
カスタムフィールドはグループに対して設定するので、サーバをデフォルトグループの”Computers”に入れていると、全てのサーバにカスタムフィールドが設定されてしまう。
- [[参考>https://community.opmantek.com/display/OA/Fields]
レポート
ディスク使用率
ディスク名とパーティション名の対応、そのパーティションのサイズ、使用量と空き容量などが表示される。
- パス
Report > Device > Disk Partition Use
待ち受けポート一覧
現在LISTEN中のポート一覧とそのプログラム名が表示される。
- パス
Report > Device > Netstat Ports
OS一覧
使用しているOSとそのOSを使用しているノード一覧を表示できる。
OSはバージョンレベルで一覧化できる。
- パス
Report > Device > Operating System Names
ハードウェア一覧
使用しているハードウェアとそのハードウェアを使用しているノード一覧を表示できる。
- パス
Report > Hardware > Devices
CPUとメモリ一覧
ノード毎に使用しているCPUの種類、速度、数とメモリの合計サイズを一覧化できる。
- パス
Report > Hardware > Memory and Processors
サーバタイプ一覧
サーバにインストールしているソフトウェア毎に一覧化できる。
WebやDatabaseでグルーピングされ、使用しているソフトウェアの種類とバージョンを表示できる。
- パス
Report > Server > Server Types
ソフトウェア一覧
インストールされているソフトウェア(パッケージ)一覧を表示できる。
ソフトウェア(パッケージ)毎にインストールされているノードとバージョンを一覧化できる。
- パス
Report > Software > Software
サービス一覧
稼働しているサービス一覧を表示できる。
サービス毎に稼働しているノードとバージョンを一覧化できる。
- パス
Report > Software > Services