monitoring

How to know about MySQL 'refused connections'

时光总嘲笑我的痴心妄想 提交于 2019-12-04 05:46:13
I am using MONyog to montitor my two mysql servers. I get alert emails from MONyog when something goes wrong. There is an error I could not find out why. It says: Connection History: Percentage of refused connections) - 66.67% the percentage is not important, this is just about having refused connections. I get this email every half an hour. So this is like a constant situation. This must be my mistake, because I just set up those servers and there is no chance somebody else could be interfering the servers. MONyog advices me: Try to isolate users/applications that are using an incorrect

How to print out Nagios Service UP Time Percentage from Nagios-Report Perl Module

前提是你 提交于 2019-12-04 05:24:16
I can print out Host UP Time percentage from Nagios-Report Perl Module with following code: #!/usr/bin/perl use strict ; use Nagios::Report ; my $x = Nagios::Report->new(q<local_cgi localhost nagiosadmin>) or die "Can't construct Nagios::Report object." ; $x->mkreport( [ qw(HOST_NAME PERCENT_TOTAL_TIME_UP) ], sub { my %F = @_; my $u = $F{PERCENT_TOTAL_TIME_UP}; $u =~ s/%//; }, 0, sub { my $F = shift @_ ; } ) ; $x->debug_dump ; But How can I only print out Service UP Time Percentage? I mean only output the percentage value. I tried many options but couldn't get it right. This will produce

How to alert in Seyren with Graphite if transactions in last 60 minutes are less than x?

本小妞迷上赌 提交于 2019-12-04 04:52:26
I'm using Graphite+Statsd (with Python client) to collect custom metrics from a webapp: a counter for successful transactions. Let's say the counter is stats.transactions.count , that also has a rate/per/second metric available at stats.transactions.rate . I've also setup Seyren as a monitor+alert system and successfully pulled metrics from Graphite. Now I want to setup an alert in Seyren if the number of successful transactions in the last 60 minutes is less than a certain minimum . Which metric and Graphite function should I use? I tried with summarize(metric, '1h') but this gives me an

java 7 directory monitoring questions

萝らか妹 提交于 2019-12-04 04:07:42
I just saw an awesome feature with java 7, the directory watcher. It'll tell you when something changed in a directory without polling the directory. 1.) But it says it falls back to polling if the filesystem doesn't support registering for change events. Do all typical linux and windows filesystems(extX,ntfs,reiserXXX,jsf,zfs) support this feature? 2.) Is renaming a file inside a directory a create or a change event? Or is that one delete and one create? I can test it on one system, but will it then be the same for all filesystems? It looks like you're talking about the WatchService . The

Folder Monitoring with Batch File

两盒软妹~` 提交于 2019-12-03 22:46:03
I want to monitor my folder if new file added or not. Then If added I would like to execute some files. But I don't want to use third party app. I have some ideas but I don't know how to do that. This is my folder; D:\MonitoringFolder So every hour batch file will check the files inside of it and writes them into a txt. dir /b "D:\MonitoringFolder" > old.txt Old.txt is --> string 1 , string 2, string 3 After one hour, batch file will check it later and writes again into another txt. dir /b "D:\MonitoringFolder" > new.txt New.txt is --> string 1, string 2, string 3, string 5 Then it will

Monitor file selection in explorer (like clipboard monitoring) in C#

孤街醉人 提交于 2019-12-03 21:45:49
I am trying to create a little helper application, one scenario is "file duplication finder". What I want to do is this: I start my C# .NET app, it gives me an empty list. Start the normal windows explorer, select a file in some folder The C# app tells me stuff about this file (e.g. duplicates) How can I monitor the currently selected file in the "normal" windows explorer instance. Do I have to start the instance using .NET to have a handle of the process. Do I need a handle, or is there some "global hook" I can monitor inside C#. Its a little bit like monitoring the clipboard, but not exactly

Tool for monitoring Hibernate cache usage

你说的曾经没有我的故事 提交于 2019-12-03 21:07:14
Is there any tool which would allow for monitoring Hibernate 2nd level cache usage? I know that I could use Hibernate API for retrieving such information. But what should I do when I have application which doesn't read the information itself, and I can't modify it? Is there any way to read cache statistics from the outside of the application? Quoting Hibernate documentation : 3.4.6. Hibernate statistics If you enable hibernate.generate_statistics , Hibernate exposes a number of metrics that are useful when tuning a running system via SessionFactory.getStatistics() . Hibernate can even be

Scalable algorithm to detect stale data

荒凉一梦 提交于 2019-12-03 21:02:18
Here is the problem: "Agents" installed on many different servers send "heartbeat" signals up to a central server every 5 seconds. How can I find the ones that have missed their heartbeat for more than 10 seconds actively and raise an alert? The problem is simple if you don't think about scalablity. In the simplest form, you can record the timestamp of the latest heartbeat received from each agent in a database table and run a regular query to find the ones older than the threshold. This solution is however not scalable to millions of agents. I am looking for algorithms or techologies that

How to determine who changed a file?

为君一笑 提交于 2019-12-03 16:20:05
In Windows, how can I programmatically determine which user account last changed or deleted a file? I know that setting up object access auditing may be an option, but if I use that I then have the problem of trying to match up audit log entries to specific files... sounds complex and messy! I can't think of any other way, so does anyone either have any tips for this approach or any alternatives? You can divide your problem into two parts: Write to a log whenever a file is accessed. Parse, filter and present the relevant information of the log. Of those two part 1, writing to the log is a

Performance effect of enabling apache response time log directive

▼魔方 西西 提交于 2019-12-03 15:57:25
What affect will enabling the response time (%D) LogFormat directive have on apache performance? The response time is the time taken to serve a request in microseconds. Response time can be enabled like so: #LogFormat "%h %l %u %t \"%r\" %>s %b" # Default LogFormat LogFormat "%h %l %u %t \"%r\" %>s %b %D" # LogFormat including response time I have written a tool for monitoring and analysing backend script performance, apache-response-time , which requires response time data. I would like to warn potential users how enabling this directive will affect apache server performance. Probably not