PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib64/php/modules/imagick.so’ – liblcms2.so.2: cannot open shared object file: No such file or directory in Unknown on line 0
Not able to install imagick on CentOS, fedora or RHEL
liblcms2.so.2: cannot open shared object file
Install following packages in RHEL, fedora or CentOS
yum install lcms2
ILO monitoring with Zabbix
ILO monitring can be done via ipmi checks, you need to install freeipmi on linux: yum install freeipmi
/usr/sbin/ipmi-sensors -D LAN2_0 -h 192.168.0.7 -u administrator -p PASSWORD -l USER -W discretereading –no-header-output –quiet-cache –sdr-cache-recreate –comma-separated-output –entity-sensor-names
output:
0,System Chassis 1 UID Light,OEM Reserved,N/A,N/A,’OEM Event = 0000h’
1,System Chassis 2 Sys. Health LED,OEM Reserved,N/A,N/A,’OEM Event = 0000h’
2,Power Supply 1 Power Supply 1,Power Supply,45.00,W,’Presence detected’
3,Power Supply 2 Power Supply 2,Power Supply,90.00,W,’Presence detected’
4,Power Supply 3 Power Supplies,Power Supply,N/A,N/A,’Fully Redundant’
6,System Board 1 Fan 1,Fan,29.40,%,’transition to Running’
7,System Board 2 Fan 2,Fan,29.40,%,’transition to Running’
8,System Board 3 Fan 3,Fan,30.58,%,’transition to Running’
9,System Board 4 Fan 4,Fan,30.58,%,’transition to Running’
10,System Board 5 Fan 5,Fan,25.87,%,’transition to Running’
11,System Board 6 Fan 6,Fan,13.72,%,’transition to Running’
12,System Board 7 Fans,Fan,N/A,N/A,’Fully Redundant’
14,Air Inlet Temp 1,Temperature,21.00,C,’OK’
15,Processor 1 Temp 2,Temperature,40.00,C,’OK’
16,Processor 2 Temp 3,Temperature,40.00,C,’OK’
17,Memory Module 1 Temp 4,Temperature,30.00,C,’OK’
18,Memory Module 2 Temp 5,Temperature,29.00,C,’OK’
19,Memory Module 3 Temp 6,Temperature,36.00,C,’OK’
20,Memory Module 4 Temp 7,Temperature,36.00,C,’OK’
21,Power Unit 1 Temp 8,Temperature,42.00,C,’OK’
22,Power Unit 2 Temp 9,Temperature,36.00,C,’OK’
23,System Board 1 Temp 10,Temperature,43.00,C,’OK’
24,System Board 2 Temp 11,Temperature,33.00,C,’OK’
25,System Board 3 Temp 12,Temperature,40.00,C,’OK’
26,System Internal Expansion Board 1 Temp 13,Temperature,33.00,C,’OK’
27,System Internal Expansion Board 2 Temp 14,Temperature,35.00,C,’OK’
28,System Internal Expansion Board 3 Temp 15,Temperature,34.00,C,’OK’
when you ensure that ipmi is enabled on your server, and basic check is working, lets go to zabbix and set it up.
In Zabbix create a host with ipmi interface, and in IPMI tab setup the parameters, bellow are screenshots
Find out which version of Centos/Red Hat/Fedora you are running
bojan@veprina:~$ lsb_release -a
LSB Version: :base-4.0-ia32:base-4.0-noarch:core-4.0-ia32:core-4.0-noarch:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.4 (Final)
Release: 6.4
Codename: Final
svn sync repo to local
If you need to sync for example public repository to local for purposes of backup or offline co, here is how to:
cd /data/repos/svn/
mkdir newrepo
NEWREPO=/data/repos/svn/newrepo/
echo ‘#!/bin/sh’ > $NEWREPO/hooks/pre-revprop-change
chmod +x $NEWREPO/hooks/pre-revprop-change
svnsync init file://$NEWREPO http://public.repo.url
svnsync sync file://$NEWREPO
User name and password is asked, exploring the posibility to add user to skip u/p prompts.
bind querlog
add this to your named.conf to enable more detail logging of whats your nameserver used to resolve.
logging {
channel default_debug {
file “data/named.run”;
severity dynamic;
};
#test
channel querylog{
file “/var/named/chroot/var/log/querylog”;
severity debug 10;
print-category yes;
print-time yes;
print-severity yes;
};
category queries { querylog;};
};
Zabbix low level discovery trigger dependencies
There is NO such thing in Zabbix LLD,
so there is workaround,
create a trigger that has double check.
for example, i want to have two severities for filesystem discovery(hdd size).
If there is less than 5GB, severity High, and if there is less than 2gb severity Disaster.
for 5GB we create double check, first is to check if there is less than 5GB and second to check if there is more than 2GB, and finished trigger should look like this:
Tittle: Free disk space is less than 5GB on volume {#FSNAME} ({ITEM.VALUE2})
Expression: {Template OS Windows:vfs.fs.size[{#FSNAME},free].last(0)}<5400000000 & {Template OS Windows:vfs.fs.size[{#FSNAME},free].last(0)}>2148000000 & {Template OS Windows:vfs.fs.size[{#FSNAME},free].last(0)}
Severity: High
For 2Gb check:
Title: Free disk space is less than 2GB on volume {#FSNAME} ({ITEM.VALUE2})
Expression: {Template OS Windows:vfs.fs.size[{#FSNAME},free].last(0)}<2148000000 & {Template OS Windows:vfs.fs.size[{#FSNAME},free].last(0)}
Severity: Disaster
802.1x auth on linux.
yum install wpa_supplicant
configuration: /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
interface configuration: /etc/sysconfig/network-scripts/ifcfg-eth0
###domain credentials for RealGarant
###user: username
###pass: Jy0wvJay
DEVICE=”eth0″
NM_CONTROLLED=”yes”
ONBOOT=yes
TYPE=Ethernet
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME=”System eth0″
UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03
IEEE_8021X_EAP_METHODS=PEAP
IEEE_8021X_IDENTITY=”DOMAIN\\username”
IEEE_8021X_PASSWORD=Jy0wvJay
IEEE_8021X_CA_CERT=/root/new-CA.cer
KEY_MGMT=IEEE8021X
HWADDR=08:00:27:01:F8:C6
IEEE_8021X_INNER_AUTH_METHODS=MSCHAPV2
IPADDR=192.168.11.73
PREFIX=27
GATEWAY=192.168.11.65
DNS1=192.168.10.111
DNS2=192.168.20.111
LAST_CONNECT=1396438390
wpa_supplicant -Bw -Dwext -i eth0 -c /etc/wpa_supplicant.conf
zabbix dependencies workaround
Zabbix from version 1.8 and maybe earlier implemented dependencies for triggers.
those dependencies are working if you are using it for items on same host, like: disk usage is 20% depends of disk usage is 10%
for dependencies for trigger on trigger of another host with integrated dependencies method i was not able to accomplish its purpose.
workaround:
{host-1:icmpping[{IPADDRESS},2,3000,56,2000].sum(#10)}<5 & {gw-1:icmpping[{IPADDRESS},2,3000,56,2000].sum(#10)}>8
blokiranje mac adrese u mikrotiku
/ip firewall filter
add chain=forward src-mac-address=aa:bb:cc:dd:ee:ff action=drop
search and replace for string in file
sed -i 's/old-word/new-word/g' *.txt