How to monitor MySQL socket using icinga2Problem running mysql client, cannot connect to mysql servermy.cnf...
How do I extrude a face to a single vertex
Can I sign legal documents with a smiley face?
Varistor? Purpose and principle
What linear sensor for a keyboard?
Can I Retrieve Email Addresses from BCC?
Using a siddur to Daven from in a seforim store
Journal losing indexing services
How will losing mobility of one hand affect my career as a programmer?
Did arcade monitors have same pixel aspect ratio as TV sets?
Drawing a topological "handle" with Tikz
How should I respond when I lied about my education and the company finds out through background check?
Difference between -| and |- in TikZ
What does the Rambam mean when he says that the planets have souls?
THT: What is a squared annular “ring”?
My friend sent me a screenshot of a transaction hash, but when I search for it I find divergent data. What happened?
Bob has never been a M before
Proof of Lemma: Every nonzero integer can be written as a product of primes
Does the Mind Blank spell prevent the target from being frightened?
If a character with the Alert feat rolls a crit fail on their Perception check, are they surprised?
Indicating multiple different modes of speech (fantasy language or telepathy)
Find last 3 digits of this monster number
Why is Arduino resetting while driving motors?
Is there a word to describe the feeling of being transfixed out of horror?
Divine apple island
How to monitor MySQL socket using icinga2
Problem running mysql client, cannot connect to mysql servermy.cnf parameters to enable binary logging mySQL 4.1.20Mysql server installationApache says MySQL daemon already running; if I stop the other daemon, Apache can't start its ownMysql-Server-5.1 upgrade problemMySQL 5.0 upgrade issuesMysql stops with no visible reasonError 2013: Lost connection to MySQL server during query when executing CHECK TABLE FOR UPGRADELinux init script service - delay until mysql socket is readyMariaDB-Server wont start after Server Reboot
I would like to monitor my MySQL server using icinga2 as the title shows above. My MySQL server uses a unix socket. I tried the following:
object Service "MYSQL" {
import "generic-service"
check_command = "mysql"
vars.mysql_query_hostname = "/var/run/mysqld/mysqld.sock"
vars.mysql_ignore_auth = true
vars.mysql_port = 6800
host_name = "mysql.server"
}
and I restart the icinga2 service. When I check from icinga2 web, I have the following error for the MySQL service:
Plugin Output
Can't connect to MySQL server on '192.168.2.4' (111)
It seems that icinga2 can't check the MySQL service using the unix socket. Is there something wrong with the config I'm using?
EDIT 1:
So, I've installed icinga2 on the client and configured it as a satellite. I've been reading that icinga2 agent is the elegant way to monitor services on a remote service. Since this setup will stay, I'm willing to spend time and efforts to configure everything properly.
On the server, /etc/icinga2/conf.d/services.conf
apply Service "MySQL" {
import "generic-service"
check_command = "mysql"
command_endpoint = host.vars.client_endpoint
assign where host.vars.client_endpoint == "client1.example.com"
}
/etc/icinga2/conf.d/hosts.conf
object Host "client1.example.com" {
import "generic-host"
address = "192.168.2.4"
vars.client_endpoint = "client1.example.com"
vars.mysql_hostname = "/var/run/mysqld/mysqld.sock"
}
On the client, I've installed the required plugin "check_mysql" and icinga2 is running. When I check through the icinga2 web interface, I still get the following plugin output:
Plugin Output Can't connect to MySQL server on '192.168.2.4' (111)
It seems that it is still checking through TCP. What am I doing wrong?
mysql monitoring icinga2
bumped to the homepage by Community♦ 10 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I would like to monitor my MySQL server using icinga2 as the title shows above. My MySQL server uses a unix socket. I tried the following:
object Service "MYSQL" {
import "generic-service"
check_command = "mysql"
vars.mysql_query_hostname = "/var/run/mysqld/mysqld.sock"
vars.mysql_ignore_auth = true
vars.mysql_port = 6800
host_name = "mysql.server"
}
and I restart the icinga2 service. When I check from icinga2 web, I have the following error for the MySQL service:
Plugin Output
Can't connect to MySQL server on '192.168.2.4' (111)
It seems that icinga2 can't check the MySQL service using the unix socket. Is there something wrong with the config I'm using?
EDIT 1:
So, I've installed icinga2 on the client and configured it as a satellite. I've been reading that icinga2 agent is the elegant way to monitor services on a remote service. Since this setup will stay, I'm willing to spend time and efforts to configure everything properly.
On the server, /etc/icinga2/conf.d/services.conf
apply Service "MySQL" {
import "generic-service"
check_command = "mysql"
command_endpoint = host.vars.client_endpoint
assign where host.vars.client_endpoint == "client1.example.com"
}
/etc/icinga2/conf.d/hosts.conf
object Host "client1.example.com" {
import "generic-host"
address = "192.168.2.4"
vars.client_endpoint = "client1.example.com"
vars.mysql_hostname = "/var/run/mysqld/mysqld.sock"
}
On the client, I've installed the required plugin "check_mysql" and icinga2 is running. When I check through the icinga2 web interface, I still get the following plugin output:
Plugin Output Can't connect to MySQL server on '192.168.2.4' (111)
It seems that it is still checking through TCP. What am I doing wrong?
mysql monitoring icinga2
bumped to the homepage by Community♦ 10 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I would like to monitor my MySQL server using icinga2 as the title shows above. My MySQL server uses a unix socket. I tried the following:
object Service "MYSQL" {
import "generic-service"
check_command = "mysql"
vars.mysql_query_hostname = "/var/run/mysqld/mysqld.sock"
vars.mysql_ignore_auth = true
vars.mysql_port = 6800
host_name = "mysql.server"
}
and I restart the icinga2 service. When I check from icinga2 web, I have the following error for the MySQL service:
Plugin Output
Can't connect to MySQL server on '192.168.2.4' (111)
It seems that icinga2 can't check the MySQL service using the unix socket. Is there something wrong with the config I'm using?
EDIT 1:
So, I've installed icinga2 on the client and configured it as a satellite. I've been reading that icinga2 agent is the elegant way to monitor services on a remote service. Since this setup will stay, I'm willing to spend time and efforts to configure everything properly.
On the server, /etc/icinga2/conf.d/services.conf
apply Service "MySQL" {
import "generic-service"
check_command = "mysql"
command_endpoint = host.vars.client_endpoint
assign where host.vars.client_endpoint == "client1.example.com"
}
/etc/icinga2/conf.d/hosts.conf
object Host "client1.example.com" {
import "generic-host"
address = "192.168.2.4"
vars.client_endpoint = "client1.example.com"
vars.mysql_hostname = "/var/run/mysqld/mysqld.sock"
}
On the client, I've installed the required plugin "check_mysql" and icinga2 is running. When I check through the icinga2 web interface, I still get the following plugin output:
Plugin Output Can't connect to MySQL server on '192.168.2.4' (111)
It seems that it is still checking through TCP. What am I doing wrong?
mysql monitoring icinga2
I would like to monitor my MySQL server using icinga2 as the title shows above. My MySQL server uses a unix socket. I tried the following:
object Service "MYSQL" {
import "generic-service"
check_command = "mysql"
vars.mysql_query_hostname = "/var/run/mysqld/mysqld.sock"
vars.mysql_ignore_auth = true
vars.mysql_port = 6800
host_name = "mysql.server"
}
and I restart the icinga2 service. When I check from icinga2 web, I have the following error for the MySQL service:
Plugin Output
Can't connect to MySQL server on '192.168.2.4' (111)
It seems that icinga2 can't check the MySQL service using the unix socket. Is there something wrong with the config I'm using?
EDIT 1:
So, I've installed icinga2 on the client and configured it as a satellite. I've been reading that icinga2 agent is the elegant way to monitor services on a remote service. Since this setup will stay, I'm willing to spend time and efforts to configure everything properly.
On the server, /etc/icinga2/conf.d/services.conf
apply Service "MySQL" {
import "generic-service"
check_command = "mysql"
command_endpoint = host.vars.client_endpoint
assign where host.vars.client_endpoint == "client1.example.com"
}
/etc/icinga2/conf.d/hosts.conf
object Host "client1.example.com" {
import "generic-host"
address = "192.168.2.4"
vars.client_endpoint = "client1.example.com"
vars.mysql_hostname = "/var/run/mysqld/mysqld.sock"
}
On the client, I've installed the required plugin "check_mysql" and icinga2 is running. When I check through the icinga2 web interface, I still get the following plugin output:
Plugin Output Can't connect to MySQL server on '192.168.2.4' (111)
It seems that it is still checking through TCP. What am I doing wrong?
mysql monitoring icinga2
mysql monitoring icinga2
edited Mar 8 '17 at 14:30
sysmodder
asked Mar 6 '17 at 11:27
sysmoddersysmodder
136
136
bumped to the homepage by Community♦ 10 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 10 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Is Icinga2 runs on the same server of your MySQL service ? In this case you would have a problem in your command. Can you paste the detail of your command in your question.
In other case, to test a Unix socket for mysql which not listen on a TCP port, you must use NRPE or SSH to connect to your mysql server and check the service. The result will be send to your icinga2 server.
EDIT 1 :
If you want to test a service which has not a listener on the network on a remote server, you can use several things :
- check_by_ssh
With that, you will be able to execute remote commands on your remote server and the answer of this command will be send to your icinga2 server. This solution impose a ssh configuration between yous servers.
- NRPE
Otherwise, you can install NRPE on the remote server and execute commands with their results will be send to your icinga2 server.
NRPE can be run on windows or linux.
I think these two solutions are more simple than install icinga2 as a satellite on all your servers to be supervised.
Sorry for the late answer. I'm totally new to monitoring systems and icinga2 is my first. OK, sounds logical. Can it be done if I install icinga2 on the client that I want to monitor and configure it as a satellite?
– sysmodder
Mar 8 '17 at 9:10
I edited my answer, I think install satellite is complicated for just test a service.
– Sorcha
Mar 8 '17 at 9:46
Thanks a lot for the quick answer and for your help! Actually, It's not a test setup. It's rather an actually setup with many clients but since I'm new to all this, I'm trying to add on client at a time and then configure all the services I need. I'll edit my answer to have a better understanding on how I configured MySQL check.
– sysmodder
Mar 8 '17 at 14:14
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "2"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f836541%2fhow-to-monitor-mysql-socket-using-icinga2%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Is Icinga2 runs on the same server of your MySQL service ? In this case you would have a problem in your command. Can you paste the detail of your command in your question.
In other case, to test a Unix socket for mysql which not listen on a TCP port, you must use NRPE or SSH to connect to your mysql server and check the service. The result will be send to your icinga2 server.
EDIT 1 :
If you want to test a service which has not a listener on the network on a remote server, you can use several things :
- check_by_ssh
With that, you will be able to execute remote commands on your remote server and the answer of this command will be send to your icinga2 server. This solution impose a ssh configuration between yous servers.
- NRPE
Otherwise, you can install NRPE on the remote server and execute commands with their results will be send to your icinga2 server.
NRPE can be run on windows or linux.
I think these two solutions are more simple than install icinga2 as a satellite on all your servers to be supervised.
Sorry for the late answer. I'm totally new to monitoring systems and icinga2 is my first. OK, sounds logical. Can it be done if I install icinga2 on the client that I want to monitor and configure it as a satellite?
– sysmodder
Mar 8 '17 at 9:10
I edited my answer, I think install satellite is complicated for just test a service.
– Sorcha
Mar 8 '17 at 9:46
Thanks a lot for the quick answer and for your help! Actually, It's not a test setup. It's rather an actually setup with many clients but since I'm new to all this, I'm trying to add on client at a time and then configure all the services I need. I'll edit my answer to have a better understanding on how I configured MySQL check.
– sysmodder
Mar 8 '17 at 14:14
add a comment |
Is Icinga2 runs on the same server of your MySQL service ? In this case you would have a problem in your command. Can you paste the detail of your command in your question.
In other case, to test a Unix socket for mysql which not listen on a TCP port, you must use NRPE or SSH to connect to your mysql server and check the service. The result will be send to your icinga2 server.
EDIT 1 :
If you want to test a service which has not a listener on the network on a remote server, you can use several things :
- check_by_ssh
With that, you will be able to execute remote commands on your remote server and the answer of this command will be send to your icinga2 server. This solution impose a ssh configuration between yous servers.
- NRPE
Otherwise, you can install NRPE on the remote server and execute commands with their results will be send to your icinga2 server.
NRPE can be run on windows or linux.
I think these two solutions are more simple than install icinga2 as a satellite on all your servers to be supervised.
Sorry for the late answer. I'm totally new to monitoring systems and icinga2 is my first. OK, sounds logical. Can it be done if I install icinga2 on the client that I want to monitor and configure it as a satellite?
– sysmodder
Mar 8 '17 at 9:10
I edited my answer, I think install satellite is complicated for just test a service.
– Sorcha
Mar 8 '17 at 9:46
Thanks a lot for the quick answer and for your help! Actually, It's not a test setup. It's rather an actually setup with many clients but since I'm new to all this, I'm trying to add on client at a time and then configure all the services I need. I'll edit my answer to have a better understanding on how I configured MySQL check.
– sysmodder
Mar 8 '17 at 14:14
add a comment |
Is Icinga2 runs on the same server of your MySQL service ? In this case you would have a problem in your command. Can you paste the detail of your command in your question.
In other case, to test a Unix socket for mysql which not listen on a TCP port, you must use NRPE or SSH to connect to your mysql server and check the service. The result will be send to your icinga2 server.
EDIT 1 :
If you want to test a service which has not a listener on the network on a remote server, you can use several things :
- check_by_ssh
With that, you will be able to execute remote commands on your remote server and the answer of this command will be send to your icinga2 server. This solution impose a ssh configuration between yous servers.
- NRPE
Otherwise, you can install NRPE on the remote server and execute commands with their results will be send to your icinga2 server.
NRPE can be run on windows or linux.
I think these two solutions are more simple than install icinga2 as a satellite on all your servers to be supervised.
Is Icinga2 runs on the same server of your MySQL service ? In this case you would have a problem in your command. Can you paste the detail of your command in your question.
In other case, to test a Unix socket for mysql which not listen on a TCP port, you must use NRPE or SSH to connect to your mysql server and check the service. The result will be send to your icinga2 server.
EDIT 1 :
If you want to test a service which has not a listener on the network on a remote server, you can use several things :
- check_by_ssh
With that, you will be able to execute remote commands on your remote server and the answer of this command will be send to your icinga2 server. This solution impose a ssh configuration between yous servers.
- NRPE
Otherwise, you can install NRPE on the remote server and execute commands with their results will be send to your icinga2 server.
NRPE can be run on windows or linux.
I think these two solutions are more simple than install icinga2 as a satellite on all your servers to be supervised.
edited Mar 8 '17 at 9:45
answered Mar 6 '17 at 12:37
SorchaSorcha
1,15548
1,15548
Sorry for the late answer. I'm totally new to monitoring systems and icinga2 is my first. OK, sounds logical. Can it be done if I install icinga2 on the client that I want to monitor and configure it as a satellite?
– sysmodder
Mar 8 '17 at 9:10
I edited my answer, I think install satellite is complicated for just test a service.
– Sorcha
Mar 8 '17 at 9:46
Thanks a lot for the quick answer and for your help! Actually, It's not a test setup. It's rather an actually setup with many clients but since I'm new to all this, I'm trying to add on client at a time and then configure all the services I need. I'll edit my answer to have a better understanding on how I configured MySQL check.
– sysmodder
Mar 8 '17 at 14:14
add a comment |
Sorry for the late answer. I'm totally new to monitoring systems and icinga2 is my first. OK, sounds logical. Can it be done if I install icinga2 on the client that I want to monitor and configure it as a satellite?
– sysmodder
Mar 8 '17 at 9:10
I edited my answer, I think install satellite is complicated for just test a service.
– Sorcha
Mar 8 '17 at 9:46
Thanks a lot for the quick answer and for your help! Actually, It's not a test setup. It's rather an actually setup with many clients but since I'm new to all this, I'm trying to add on client at a time and then configure all the services I need. I'll edit my answer to have a better understanding on how I configured MySQL check.
– sysmodder
Mar 8 '17 at 14:14
Sorry for the late answer. I'm totally new to monitoring systems and icinga2 is my first. OK, sounds logical. Can it be done if I install icinga2 on the client that I want to monitor and configure it as a satellite?
– sysmodder
Mar 8 '17 at 9:10
Sorry for the late answer. I'm totally new to monitoring systems and icinga2 is my first. OK, sounds logical. Can it be done if I install icinga2 on the client that I want to monitor and configure it as a satellite?
– sysmodder
Mar 8 '17 at 9:10
I edited my answer, I think install satellite is complicated for just test a service.
– Sorcha
Mar 8 '17 at 9:46
I edited my answer, I think install satellite is complicated for just test a service.
– Sorcha
Mar 8 '17 at 9:46
Thanks a lot for the quick answer and for your help! Actually, It's not a test setup. It's rather an actually setup with many clients but since I'm new to all this, I'm trying to add on client at a time and then configure all the services I need. I'll edit my answer to have a better understanding on how I configured MySQL check.
– sysmodder
Mar 8 '17 at 14:14
Thanks a lot for the quick answer and for your help! Actually, It's not a test setup. It's rather an actually setup with many clients but since I'm new to all this, I'm trying to add on client at a time and then configure all the services I need. I'll edit my answer to have a better understanding on how I configured MySQL check.
– sysmodder
Mar 8 '17 at 14:14
add a comment |
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f836541%2fhow-to-monitor-mysql-socket-using-icinga2%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown