-
Notifications
You must be signed in to change notification settings - Fork 7
*: Data collection from FCOS machines #31
base: main
Are you sure you want to change the base?
Conversation
Currently in |
Also, this PR will be updated to resolve #30 (comment) |
Collects ignition platform id from /proc/cmdline in the varriable `ignition.platform.id=` and stores the collected data inside the `identity::Identity` struct. Also adds different grains of data collection level: minimum and full, depending on the passed toml configuration. Signed-off-by: Allen Bai, abai@redhat.com
Changes the use of term "metrics", deduplicates match pattern and uses maplit::hashmap! macro.
9f28b8e
to
1d92353
Compare
UPDATE:
Note: Most portion of code is the same as |
Picks up CoreOS alpha version information from `/.coreos-aleph-version.json`. Signed-off-by: Allen Bai, abai@redhat.com
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks sane from a quick scan!
bcde4ce
to
9f95f1d
Compare
97f3a1d
to
b3a806b
Compare
b3a806b
to
b35c9a1
Compare
src/full: add hardware data collection Signed-off-by: Allen Bai <abai@redhat.com>
Signed-off-by: Allen Bai <abai@redhat.com>
Signed-off-by: Allen Bai <abai@redhat.com>
STATUS: EDIT:
|
96eb3d1
to
01b0a44
Compare
.travis.yml: test inside ubi container instead of ubuntu vm Allows "yes"/"no" values for `removable` field of `lsmem --json`, because of different implementations, the field type might be different. However, in an FCOS machine this will be true/false. This change is mainly to accommodate testing environment. Signed-off-by: Allen Bai <abai@redhat.com>
01b0a44
to
d209da0
Compare
Signed-off-by: Allen Bai <abai@redhat.com> agent/full: only collect hw info on bare metals Signed-off-by: Allen Bai <abai@redhat.com> full/network: collect network info with `nmcli` Collects network data with format `[key[\s]+value\n]+`, to see example run `nmcli device show`. Parse the data as key:value pairs stored in a HashMap. Signed-off-by: Allen Bai <abai@redhat.com>
Signed-off-by: Allen Bai <abai@redhat.com>
STATUS:
|
tests: add tests to print minimum and full agent with test config file Signed-off-by: Allen Bai <abai@redhat.com>
05db91d
to
ec203b0
Compare
Signed-off-by: Allen Bai <abai@redhat.com>
5d8917e
to
e650f00
Compare
STATUS:
Overall, ready for review! |
Dockerfile: install dependency, openssl-devel Signed-off-by: Allen Bai <abai@redhat.com>
8732dfc
to
5267871
Compare
Since reporting will happen daily or monthly, we are keeping track of time intervals between reports. Two threads are spawned for tracking daily and monthly reporting. Daily thread will check timestamp every 12 hours, otherwise put to sleep. Monthly thread will check every 15 days, otherwise put to sleep. Signed-off-by: Allen Bai <abai@redhat.com>
STATUS:
|
0076acf
to
a0ab83a
Compare
…time Previously we are using individual container runtimes to extract container information, e.g. calling `podman container ls` to count running containers. It would create two problems: - podman failed when trying to create `/.config/containers` since root dir is read-only and dynamic user does not have its own home dir - successful calls do not make sense either since counting running containers under the dynamic user is not useful Hence, switch to count containers by calling `pgrep` and count the running processes of each container runtime. Signed-off-by: Allen Bai <abai@redhat.com>
a0ab83a
to
4387efa
Compare
Previously used `StateDirectory=` to persist pinger specific data across bootups. It turns out that systemd does not allow sharing state directory across different dynamic users. An example would be: ``` $ systemd-run --pty --property=DynamicUser=yes --property=StateDirectory=wuff /bin/sh $ systemd-run --pty --property=DynamicUser=yes --property=StateDirectory=wuff /bin/sh ``` Reference: http://0pointer.net/blog/dynamic-users-with-systemd.html Signed-off-by: Allen Bai <abai@redhat.com>
Is this something we want to continue pursuing? |
Maybe not; xref coreos/fedora-coreos-tracker#770. |
Source of truth for each part of data collected:
/proc/cmdline
rpm-ostree status --json
/.coreos-aleph-version.json
/run/metadata/afterburn
lsblk --fs --json
lscpu --json
lsmem --json
nmcli device show
pgrep podman
pgrep conmon | wc -l
pgrep dockerd
pgrep containerd-shim | wc -l
pgrep crio
pgrep crictl | wc -l
pgrep systemd-nspawn
Signed-off-by: Allen Bai, abai@redhat.com