в zabbix_agentd.conf
EnableRemoteCommands=1
файл: checkssl.sh
#!/bin/bash
ssl-cert-check -s $1 -p $2 -n | sed 's/ */ /g' | cut -f6 -d" " | sed -e 's#|days=##'
Items:
Trigger:
в zabbix_agentd.conf
EnableRemoteCommands=1
файл: checkssl.sh
#!/bin/bash
ssl-cert-check -s $1 -p $2 -n | sed 's/ */ /g' | cut -f6 -d" " | sed -e 's#|days=##'
Items:
# touch /etc/systemd/system/icecast.service
[Unit]
Description=Icecast Network Audio Streaming Server
After=network.target
[Service]
Type=simple
ExecStart=/usr/local/Icecast-Server/bin/icecast -c /usr/local/Icecast-Server/etc/icecast.xml
ExecReload=/bin/kill -HUP $MAINPID
User=radio
Group=radio
WorkingDirectory=/usr/local/Icecast-Server
[Install]
WantedBy=multi-user.target
# systemctl enable icecast
# systemctl start icecast
# systemctl stop icecast
# systemctl restart icecast
Таблиці:
SELECT CONCAT('ALTER TABLE ',
table_schema,
'.',
table_name,
' COLLATE=utf8_bin;') AS cmd
FROM (SELECT table_schema,
table_name,
table_collation
FROM information_schema.tables t
WHERE table_schema = 'zabbix'
AND table_collation != 'utf8_bin') AS tables
ORDER BY cmd;Поля:
SELECT CONCAT('ALTER TABLE ',
table_schema,
'.',
table_name,
' MODIFY COLUMN ',
column_name,
' ',
column_type,
' CHARACTER SET utf8 COLLATE utf8_bin',
defaultval,
nullable,
';') AS cmd
FROM (SELECT table_schema,
table_name,
column_name,
collation_name,
character_set_name,
column_type,
column_default,
CASE
WHEN column_default IS NULL THEN ''
ELSE CONCAT(' DEFAULT ''', column_default, ''' ')
END AS defaultval,
CASE
WHEN is_nullable = 'NO' THEN ' NOT NULL '
ELSE ''
END AS nullable
FROM information_schema.columns
WHERE table_schema = 'zabbix'
AND ( collation_name != 'utf8_bin'
OR character_set_name != 'utf8' )) AS cols
ORDER BY cmd;
# /etc/systemd/system/docker-compose-app.service
[Unit]
Description=Docker Compose Application Service
Requires=docker.service
After=docker.service
[Service]
Type=oneshot
RemainAfterExit=yes
WorkingDirectory=/srv/docker
ExecStart=/usr/local/bin/docker-compose up -d
ExecStop=/usr/local/bin/docker-compose down
TimeoutStartSec=0
[Install]
WantedBy=multi-user.target
активовуємо автозапуск сервісу# systemctl enable docker-compose-app
DELETE FROM `table` WHERE id NOT IN ( SELECT id FROM ( SELECT id FROM `table` ORDER BY id DESC LIMIT 10 -- keep this many records ) foo );
|| (count($analyzed_sql_results['select_expr'] == 1)
|| ((count($analyzed_sql_results['select_expr']) == 1)