Tech C**P
15 subscribers
161 photos
9 videos
59 files
304 links
مدرس و برنامه نویس پایتون و لینوکس @alirezastack
Download Telegram
If you want to see how much actual data is stored in your MyISAM, InnoDB:

SELECT IFNULL(B.engine,'Total') "Storage Engine",
CONCAT(LPAD(REPLACE(FORMAT(B.DSize/POWER(1024,pw),3),',',''),17,' '),' ',
SUBSTR(' KMGTP',pw+1,1),'B') "Data Size", CONCAT(LPAD(REPLACE(
FORMAT(B.ISize/POWER(1024,pw),3),',',''),17,' '),' ',
SUBSTR(' KMGTP',pw+1,1),'B') "Index Size", CONCAT(LPAD(REPLACE(
FORMAT(B.TSize/POWER(1024,pw),3),',',''),17,' '),' ',
SUBSTR(' KMGTP',pw+1,1),'B') "Table Size"
FROM (SELECT engine,SUM(data_length) DSize,SUM(index_length) ISize,
SUM(data_length+index_length) TSize FROM information_schema.tables
WHERE table_schema NOT IN ('mysql','information_schema','performance_schema')
AND engine IS NOT NULL GROUP BY engine WITH ROLLUP) B,
(SELECT 3 pw) A ORDER BY TSize;

#mysql #myisam #innodb #storage_engine #se
How to ignore a specific partition in Icinga2 monitoring server?

Sometimes a specific partition has been mounted on many servers. Now if you monitor disk partitions on Icinga2 and a warning message appears on that specific partition you will get notifications as many as your servers.

Icinga2 uses Snmp Storage Check in order to get disk partitions and their data. The command is located in /etc/icinga2/conf.d/ commands/snmp-storage.conf. (Its name maybe different in your case)

This command will use check_snmp_storage.pl nagios plugin, the overall structure of it is similar to:

object CheckCommand "snmp-storage" {
import "snmp-manubulon-command"

command = [ ManubulonPluginDir + "/check_snmp_storage.pl" ]

arguments += {
"-m" = "$snmp_storage_name$"
"-f" = {
set_if = "$snmp_perf$"
}
"-w" = 87
"-c" = 95
"-H" = "$address$"
"-m" = "^Cached|^Shared|^Swap|^/run|^Physical|^Memory|^Virtual|^/dev|^/sys|^/mnt/remote_folder"
"-e" = ""
}

vars.snmp_perf = true
}

-m parameter will ignore partitions. Here we have provided many partitions like /sys or /mnt/remote_folder. These partitions will be ignored all over. Add your desired partitions to this section.

To read more about this Perl plug-in head over to the below link:
- http://nagios.manubulon.com/snmp_storage.html

#monitoring #icinga2 #snmp #storage #snmp_storage