LXC/Monitor: Difference between revisions
Jump to navigation
Jump to search
m Shahed moved page Monitor to LXC/Monitor without leaving a redirect |
|||
| (8 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
==LXC » Monitor » Alpine== | |||
<syntaxhighlight lang="bash"> | |||
lxc image ls images:alpine/3.21 | |||
lxc rm -f monitor 2>/dev/null | |||
lxc launch images:alpine/3.21 monitor | |||
lxc delete monitor/alpine:3.21 2>/dev/null | |||
lxc snapshot monitor alpine:3.21 | |||
lxc export monitor monitor_alpine-20250604.tar.gz --optimized-storage | |||
lxc rm -f monitor 2>/dev/null | |||
lxc import monitor monitor_alpine-20250604.tar.gz monitor | |||
lxc start monitor | |||
lxc restore monitor alpine:3.21 | |||
lxc info monitor | |||
</syntaxhighlight> | |||
==LXC » Monitor » Ubuntu== | |||
<syntaxhighlight lang="bash"> | |||
lxc image ls ubuntu:24.04 | |||
lxc rm -f monitor 2>/dev/null | |||
lxc launch ubuntu:24.04 monitor | |||
lxc delete monitor/ubuntu:24.04 2>/dev/null | |||
lxc snapshot monitor ubuntu:24.04 | |||
lxc export monitor monitor_ubuntu-20250604.tar.gz --optimized-storage | |||
lxc rm -f monitor 2>/dev/null | |||
lxc import monitor_ubuntu-20250604.tar.gz monitor | |||
lxc start monitor | |||
lxc restore monitor ubuntu:24.04 | |||
lxc info monitor | |||
</syntaxhighlight> | |||
---- | |||
<syntaxhighlight lang="bash"> | |||
lxc exec monitor -- bash | |||
curl --proto '=https' --tlsv1.2 -sSfL https://sh.vector.dev|bash | |||
exit | |||
cat <<'EXE'| lxc exec monitor -- bash | |||
sed -i '$d' /root/.profile | |||
sed -i '$d' /root/.zprofile | |||
cat <<'ENV'| tee -a /root/.{bashrc,profile,zprofile} >/dev/null | |||
export PATH=${PATH}:/root/.vector/bin | |||
ENV | |||
EXE | |||
cat <<'EXE'| lxc exec monitor -- bash | |||
export PATH=${PATH}:/root/.vector/bin | |||
vector --version | |||
EXE | |||
lxc delete monitor/vector:0.47.0 2>/dev/null | |||
lxc snapshot monitor vector:0.47.0 | |||
lxc export monitor monitor_vector-20250609.tar.gz --optimized-storage | |||
lxc rm -f monitor 2>/dev/null | |||
lxc import monitor_vector-20250609.tar.gz monitor | |||
lxc start monitor | |||
lxc restore monitor vector:0.47.0 | |||
lxc info monitor | |||
</syntaxhighlight> | |||
==Playground== | ==Playground== | ||
{| | {| | ||
| colspan="2" | | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
INET_PATH='.[].state.network.[].addresses[]|select(.family=="inet" and .scope=="global").address' | |||
INET_ADDR=$(lxc list name=monitor -f=yaml|yq -r "${INET_PATH}") | |||
</syntaxhighlight> | </syntaxhighlight> | ||
| valign="top" | | | valign="top" | | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
find /var/log/academia/ -type d -print | |||
find /var/log/academia/ -type f -print | |||
</syntaxhighlight> | |||
|- | |||
| colspan="3" | | |||
---- | |||
|- | |||
| valign="top" colspan="2" | | |||
<syntaxhighlight lang="bash"> | |||
find /var/log/academia/ -mindepth 3 -maxdepth 3 -type f -name '*.gz' -mtime +50 -print | |||
find /var/log/academia/ -mindepth 2 -maxdepth 2 -type d -empty -print | |||
find /var/log/academia/ -mindepth 1 -maxdepth 1 -type d -empty -print | |||
</syntaxhighlight> | </syntaxhighlight> | ||
| valign="top" | | | valign="top" | | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
apt-get install -y s3fs | |||
apt search s3fs | |||
s3fs --version | |||
</syntaxhighlight> | </syntaxhighlight> | ||
| Line 32: | Line 117: | ||
{| | {| | ||
|valign='top'| | |valign='top'| | ||
* [https://vector.dev/docs/reference/configuration/ Monitor » Vector » Config] | |||
* [https://launchpad.net/ubuntu/noble/+source/s3fs-fuse Monitor » Vector » <code>s3fs</code>] | |||
* [https://vector.dev/docs/setup/installation/ Monitor » Vector » Install] | |||
* [https://vector.dev/docs/reference/vrl/ Monitor » Vector » VRL] | |||
* [https://vector.dev/ Monitor » Vector] | * [https://vector.dev/ Monitor » Vector] | ||
|valign='top'| | |||
|valign='top'| | |||
|- | |||
|colspan='3'| | |||
---- | |||
|- | |||
|valign='top'| | |||
* [[LXC/Alpine/Apache/PHP|LXC » Alpine » Apache » PHP]] | |||
* [[LXC/Alpine/Nginx/PHP|LXC » Alpine » Nginx » PHP]] | |||
* [[LXC/Logrotate|LXC » Logrotate]] | |||
* [[Linux Containers|LXC]] | |||
|valign='top'| | |valign='top'| | ||
| Line 55: | Line 158: | ||
|valign='top'| | |valign='top'| | ||
* [ | * [https://min.io/docs/minio/linux/reference/minio-mc/mc-ping.html MinIO » MC » Ping] | ||
* [[Helm/MinIO|Helm » MinIO]] | |||
* [[ | |||
* [[Terraform]] | * [[Terraform]] | ||
* [[Proxmox]] | * [[Proxmox]] | ||
* [[Kubectl]] | * [[Kubectl]] | ||
* [[Ansible]] | * [[Ansible]] | ||
* [[MinIO]] | |||
* [[CIDR]] | * [[CIDR]] | ||
* [[UFW]] | * [[UFW]] | ||
| Line 67: | Line 170: | ||
|valign='top'| | |valign='top'| | ||
|} | |} | ||
Latest revision as of 09:25, 9 June 2025
LXC » Monitor » Alpine
lxc image ls images:alpine/3.21
lxc rm -f monitor 2>/dev/null
lxc launch images:alpine/3.21 monitor
lxc delete monitor/alpine:3.21 2>/dev/null
lxc snapshot monitor alpine:3.21
lxc export monitor monitor_alpine-20250604.tar.gz --optimized-storage
lxc rm -f monitor 2>/dev/null
lxc import monitor monitor_alpine-20250604.tar.gz monitor
lxc start monitor
lxc restore monitor alpine:3.21
lxc info monitor
LXC » Monitor » Ubuntu
lxc image ls ubuntu:24.04
lxc rm -f monitor 2>/dev/null
lxc launch ubuntu:24.04 monitor
lxc delete monitor/ubuntu:24.04 2>/dev/null
lxc snapshot monitor ubuntu:24.04
lxc export monitor monitor_ubuntu-20250604.tar.gz --optimized-storage
lxc rm -f monitor 2>/dev/null
lxc import monitor_ubuntu-20250604.tar.gz monitor
lxc start monitor
lxc restore monitor ubuntu:24.04
lxc info monitor
lxc exec monitor -- bash
curl --proto '=https' --tlsv1.2 -sSfL https://sh.vector.dev|bash
exit
cat <<'EXE'| lxc exec monitor -- bash
sed -i '$d' /root/.profile
sed -i '$d' /root/.zprofile
cat <<'ENV'| tee -a /root/.{bashrc,profile,zprofile} >/dev/null
export PATH=${PATH}:/root/.vector/bin
ENV
EXE
cat <<'EXE'| lxc exec monitor -- bash
export PATH=${PATH}:/root/.vector/bin
vector --version
EXE
lxc delete monitor/vector:0.47.0 2>/dev/null
lxc snapshot monitor vector:0.47.0
lxc export monitor monitor_vector-20250609.tar.gz --optimized-storage
lxc rm -f monitor 2>/dev/null
lxc import monitor_vector-20250609.tar.gz monitor
lxc start monitor
lxc restore monitor vector:0.47.0
lxc info monitor
Playground
INET_PATH='.[].state.network.[].addresses[]|select(.family=="inet" and .scope=="global").address'
INET_ADDR=$(lxc list name=monitor -f=yaml|yq -r "${INET_PATH}")
|
find /var/log/academia/ -type d -print
find /var/log/academia/ -type f -print
| |
|
| ||
find /var/log/academia/ -mindepth 3 -maxdepth 3 -type f -name '*.gz' -mtime +50 -print
find /var/log/academia/ -mindepth 2 -maxdepth 2 -type d -empty -print
find /var/log/academia/ -mindepth 1 -maxdepth 1 -type d -empty -print
|
apt-get install -y s3fs
apt search s3fs
s3fs --version
| |
|
| ||
References
|
| ||
|
| ||