Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
02-09-2017, 01:11 PM
|
#1
|
Member
Registered: Jul 2009
Posts: 645
Rep:
|
zabbix server triggers
Hello all,
I am using Zabbix 3.2, and setting up trigger, my trigger is as follows
Code:
{Template Social -Proc:proc.num[php,root].max(2m)}<2
I want to monitor php process running on zabbix agents, from the zabbix server I run
Code:
zabbix_get -s node22 -k proc.num[php]
and I get 2, which is correct.There are 2 php processes running, but that trigger is showing error on the site and is sending emails for a number of servers.Can I get some assistance in configuring this please ?, how can I troubleshoot it ? I am using zabbix_agent(active) and I tried zabbix agent
Last edited by cbtshare; 02-09-2017 at 04:16 PM.
|
|
|
02-09-2017, 02:16 PM
|
#2
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,191
|
Quote:
Originally Posted by cbtshare
Hello all,
I am using Zabbix 3.2, and setting up trigger, my trigger is as follows
Code:
{Template Social -Proc:proc.num[php,root].max(2m)}<2
I want to monitor php process running on zabbix agents, from the zabbix server I run
Code:
zabbix_get -s node22.socialpatrol.net -k proc.num[php]
and I get 2, which is correct.There are 2 php processes running, but that trigger is showing error on the site and is sending emails for a number of servers.Can I get some assistance in configuring this please ?, how can I troubleshoot it ? I am using zabbix_agent(active) and I tried zabbix agent
|
Which version/distro of Linux is this running on??? How was it built/installed? What's your configuration?
Also..it seems you've been using Zabbix for five years now: http://www.linuxquestions.org/questi...toring-927708/
What troubleshooting have you done? Have you tried setting the number higher, to see if the problem goes away? And are you *SURE* that you only have 2 running?
https://www.zabbix.com/documentation...kstart/trigger
|
|
|
02-09-2017, 03:25 PM
|
#3
|
Member
Registered: Jul 2009
Posts: 645
Original Poster
Rep:
|
Quote:
Originally Posted by TB0ne
|
I am using CentOS release 6.8 (Final) it was built in AWS
Yes, I have been using zabbix for five years now, so I can't ask a question, whats your point?
Troubleshooting steps:
I have tried different comparative methods , last() , diff() , minimum 2 minutes
As I said above I ran the zabbix_get command on the server against different nodes and got the correct value 2
I also ran ps fu root and saw the two php processes running , and if I stopped the php script, and run the zabbix_get commannd against the node I get 0 which is correct]
I also read many tutorials, so my last resort was to ask a question.
|
|
|
02-09-2017, 06:11 PM
|
#4
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,191
|
Quote:
Originally Posted by cbtshare
I am using CentOS release 6.8 (Final) it was built in AWS
|
So this is a hosted server...which makes a difference
Quote:
Yes, I have been using zabbix for five years now, so I can't ask a question, whats your point?
|
Because after five years, you should have pretty good knowledge of Zabbix..
Quote:
Troubleshooting steps:
I have tried different comparative methods , last() , diff() , minimum 2 minutes As I said above I ran the zabbix_get command on the server against different nodes and got the correct value 2 I also ran ps fu root and saw the two php processes running , and if I stopped the php script, and run the zabbix_get commannd against the node I get 0 which is correct]
I also read many tutorials, so my last resort was to ask a question.
|
Ok, so again: - Did you try increasing the number???
- Did you try looking at the log files???
|
|
|
02-09-2017, 06:58 PM
|
#5
|
Member
Registered: Jul 2009
Posts: 645
Original Poster
Rep:
|
Quote:
Originally Posted by TB0ne
So this is a hosted server...which makes a difference
|
I said I run the zabbix_get command, which can only be run from the SERVER, so yea to some it makes it difference lol
Quote:
Originally Posted by TB0ne
Because after five years, you should have pretty good knowledge of Zabbix..
|
Oh Yes, such a competent assumption , I am sorry, I do have GOOD KNOWLEDGE of zabbix, a direct result of using it every single day for the past five years ,forsaking everything else, I just have not been practicing triggers.
Quote:
Originally Posted by TB0ne
Ok, so again: - Did you try increasing the number???
- Did you try looking at the log files???
|
Yes, I tried increasing the number to 3 and decreasing to zero, but it makes no sense since the server is getting the correct info from zabbix_get command .
I am not seeing anything in the logs.
|
|
|
02-09-2017, 07:40 PM
|
#6
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,191
|
Quote:
Originally Posted by cbtshare
I said I run the zabbix_get command, which can only be run from the SERVER, so yea to some it makes it difference lol
|
A hosted server can act differently, due to network configuration. I didn't ask about where you ran the command, but about the server itself.
Quote:
Oh Yes, such a competent assumption , I am sorry, I do have GOOD KNOWLEDGE of zabbix, a direct result of using it every single day for the past five years ,forsaking everything else, I just have not been practicing triggers.
Yes, I tried increasing the number to 3 and decreasing to zero, but it makes no sense since the server is getting the correct info from zabbix_get command .
I am not seeing anything in the logs.
|
Done...Be sarcastic with someone else. If you can't be bothered to give details, and get snotty when asked what you've done, figure it out yourself.
|
|
|
02-10-2017, 04:37 AM
|
#7
|
LQ Veteran
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Rep:
|
Quote:
Originally Posted by cbtshare
Oh Yes, such a competent assumption , I am sorry, I do have GOOD KNOWLEDGE of zabbix, a direct result of using it every single day for the past five years ,forsaking everything else, I just have not been practicing triggers.
|
I hate triggers when they don't work.
Code:
{Template Social -Proc:proc.num[php,root].max(2m)}<2
zabbix_get -s node22 -k proc.num[php]
don't appear to me to be the same thing.
How about trying
Code:
{proc.num[[php5].last(0)}<1
https://www.zabbix.com/forum/showthread.php?t=12534
https://www.zabbix.com/forum/showthread.php?t=18170
show examples, as do the numerous zabbix templates included with the install.
Template Linux has one for apache2.
Steal that and modify,
No 2m that I see.
Something like
Code:
{Template_Linux:proc.num[php5].last(0)}<1
My point here, my good man, is start with something that is working, or should work, out of the box.
And lacking catastrophic failure, it should give you a solid base to start from.
as they are Templates aplenty in that product.
You should show a little more respect in my opinion.
Good Luck!
Last edited by Habitual; 02-10-2017 at 05:55 AM.
|
|
|
02-10-2017, 08:29 AM
|
#8
|
Member
Registered: Jul 2009
Posts: 645
Original Poster
Rep:
|
Quote:
Originally Posted by Habitual
I hate triggers when they don't work.
Code:
{Template Social -Proc:proc.num[php,root].max(2m)}<2
zabbix_get -s node22 -k proc.num[php]
don't appear to me to be the same thing.
How about trying
Code:
{proc.num[[php5].last(0)}<1
https://www.zabbix.com/forum/showthread.php?t=12534
https://www.zabbix.com/forum/showthread.php?t=18170
show examples, as do the numerous zabbix templates included with the install.
Template Linux has one for apache2.
Steal that and modify,
No 2m that I see.
Something like
Code:
{Template_Linux:proc.num[php5].last(0)}<1
My point here, my good man, is start with something that is working, or should work, out of the box.
And lacking catastrophic failure, it should give you a solid base to start from.
as they are Templates aplenty in that product.
You should show a little more respect in my opinion.
Good Luck!
|
Thank you , for your help..
My tests are below:
on the client php5 doesnt give me what I , but proc.num[php] returns the correct value
Code:
zabbix_agentd -t proc.num[php5]
proc.num[php5] [u|0]
root@node22:~# zabbix_agentd -t proc.num[php]
proc.num[php] [u|2]
On the server also returns 2, so the trigger I should be setting is less than 2 then alert
Code:
zabbix_get -s node22-k proc.num[php]
2
My issue is that there are alerts on the front page of zabbix that the service php isnt running even after I enter the new trigger and no matter what I change it to, it wont go away unless I disable it.
I also tested the trigger syntax in the expression constructor but not getting the value I want, so there is a disconnect somewhere.I tried your line but it didnt help either, the 2m was there to mean alert only if it has been down for 2 minute period.
I wasn't being disrespectful, his assiduous assumptions warranted sarcasm, in the link he posted I just recommended zabbix by going to google based on nature of the OP's question, I started using zabbix 3 months ago .
|
|
|
02-10-2017, 09:07 AM
|
#9
|
LQ Veteran
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Rep:
|
Code:
proc.num[php].last(0)}<2
and I have to say, that I am very much in your situation.
If I need to modify anything beyond what's supplied, I choke and head directly to their wiki.
Filter templates for key = proc.num with triggers, and have a look at the examples.
I'm not the one you disrespected, and You are welcome.
Peace.
Last edited by Habitual; 02-10-2017 at 09:14 AM.
|
|
|
02-10-2017, 09:47 AM
|
#10
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,191
|
Quote:
Originally Posted by cbtshare
Thank you , for your help..My tests are below:
on the client php5 doesnt give me what I , but proc.num[php] returns the correct value
Code:
zabbix_agentd -t proc.num[php5]
proc.num[php5] [u|0]
root@node22:~# zabbix_agentd -t proc.num[php]
proc.num[php] [u|2]
On the server also returns 2, so the trigger I should be setting is less than 2 then alert
Code:
zabbix_get -s node22-k proc.num[php]
2
My issue is that there are alerts on the front page of zabbix that the service php isnt running even after I enter the new trigger and no matter what I change it to, it wont go away unless I disable it.
I also tested the trigger syntax in the expression constructor but not getting the value I want, so there is a disconnect somewhere.I tried your line but it didnt help either, the 2m was there to mean alert only if it has been down for 2 minute period.
|
If you had posted this to start with, it would have been a good idea.
Quote:
I wasn't being disrespectful, his assiduous assumptions warranted sarcasm, in the link he posted I just recommended zabbix by going to google based on nature of the OP's question, I started using zabbix 3 months ago .
|
No, my "assiduous assumptions" were based on what you posted five years ago, about using/recommending Zabbix...and now you say it's just been three months? You've also been here for YEARS...not read the "Question Guidelines" yet about telling us what kind of system you're using? Version/distro of Linux? Environment? An ancient Fedora 18 systems on a WAN monitoring 1000 servers, will behave differently than a fully-supported RHEL7.x system on a local network, monitoring 4 servers. Which is why you were asked for details. Also, my assumptions were assiduous, almost to the definition of the word.
The link I sent you was to the Zabbix documentation, which had examples on how to set up triggers, and walked you through the process. In the absence of any relevant troubleshooting/information from you, what else could be said? And when you're asked, you get snotty with your "forsaking everything else" junk. I asked what you tried, and got little back except sarcasm.
Last edited by TB0ne; 02-10-2017 at 09:57 AM.
|
|
|
02-10-2017, 10:57 AM
|
#11
|
Member
Registered: Jul 2009
Posts: 645
Original Poster
Rep:
|
Quote:
Originally Posted by Habitual
and I have to say, that I am very much in your situation.
If I need to modify anything beyond what's supplied, I choke and head directly to their wiki.
Filter templates for key = proc.num with triggers, and have a look at the examples.
|
Thank you, when I figure it out I will right back here with the solution.
Quote:
Originally Posted by TB0ne
If you had posted this to start with, it would have been a good idea.
No, my "assiduous assumptions" were based on what you posted five years ago, about using/recommending Zabbix...and now you say it's just been three months? You've also been here for YEARS...not read the "Question Guidelines" yet about telling us what kind of system you're using? Version/distro of Linux? Environment? An ancient Fedora 18 systems on a WAN monitoring 1000 servers, will behave differently than a fully-supported RHEL7.x system on a local network, monitoring 4 servers. Which is why you were asked for details. Also, my assumptions were assiduous, almost to the definition of the word.
The link I sent you was to the Zabbix documentation, which had examples on how to set up triggers, and walked you through the process. In the absence of any relevant troubleshooting/information from you, what else could be said? And when you're asked, you get snotty with your "forsaking everything else" junk. I asked what you tried, and got little back except sarcasm.
|
You are still not getting, the lesson is DON'T assume, and here you go again, assuming I didn't read the Question Guidelines just because I didn't post any irrelevant details about my system.My issue is with triggers, no matter what server I am on it behaves the same(It may change depending on the trigger process name for clients), and you never asked about my network, you asked about the server.
Yes I will accept blame for not posting all the troubleshooting steps and information I had , however I didn't get snotty when asked a question, re-read the sequence of events , you made an errant assumptions and insinuated that since I posted a link on zabbix I should have GOOD KNOWLEDGE because I had been using it for 5 years, and yes forsaking everything else lolll . When you asked about my troubleshooting steps I told you, stop playing the victim and misrepresenting the events.Anyways, Have a good day.#Done
|
|
|
02-10-2017, 11:02 AM
|
#12
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,191
|
Quote:
Originally Posted by cbtshare
Thank you, when I figure it out I will right back here with the solution.
|
Great.
Quote:
You are still not getting, the lesson is DON'T assume, and here you go again, assuming I didn't read the Question Guidelines just because I didn't post any irrelevant details about my system.My issue is with triggers, no matter what server I am on it behaves the same(It may change depending on the trigger process name for clients), and you never asked about my network, you asked about the server.
|
And YOU are still not getting: The lesson is "provide details, so that PEOPLE WON'T HAVE TO ASSUME. Get it now???
They aren't "irrelevant details", and if you think they are, that's up to you. The network is part of the "irrelevant details" you said nothing about...which is when you posted about AWS/hosted. Had you started out with post #8, that would have shown you did SOME troubleshooting at least, and given folks something to work with.
Quote:
Yes I will accept blame for not posting all the troubleshooting steps and information I had , however I didn't get snotty when asked a question, re-read the sequence of events , you made an errant assumptions and insinuated that since I posted a link on zabbix I should have GOOD KNOWLEDGE because I had been using it for 5 years, and yes forsaking everything else lolll . When you asked about my troubleshooting steps I told you, stop playing the victim and misrepresenting the events.Anyways, Have a good day.#Done
|
Not errant at all...you've been here 8 years, been posting about Zabbix before; so why is it 'errant' to assume someone who's been using it for a while would actually know about the troubleshooting steps to take? Grow up.
Last edited by TB0ne; 02-10-2017 at 11:04 AM.
|
|
|
02-11-2017, 10:20 PM
|
#13
|
Member
Registered: Jul 2009
Posts: 645
Original Poster
Rep:
|
Quote:
Originally Posted by TB0ne
Great.
And YOU are still not getting: The lesson is "provide details, so that PEOPLE WON'T HAVE TO ASSUME. Get it now???
They aren't "irrelevant details", and if you think they are, that's up to you. The network is part of the "irrelevant details" you said nothing about...which is when you posted about AWS/hosted. Had you started out with post #8, that would have shown you did SOME troubleshooting at least, and given folks something to work with.
Not errant at all...you've been here 8 years, been posting about Zabbix before; so why is it 'errant' to assume someone who's been using it for a while would actually know about the troubleshooting steps to take? Grow up.
|
“Assumptions are quick exits for lazy minds that like to graze out in the fields without bother.”
― Suzy Kassem, Rise Up and Salute the Sun: The Writings of Suzy Kassem
“I say, sir, that you can never make an intelligent judgment without evidence.”
― Malcolm X
lolll moving on..
Quote:
Originally Posted by Habitual
and I have to say, that I am very much in your situation.
If I need to modify anything beyond what's supplied, I choke and head directly to their wiki.
|
Thanks for attempting to assist me, I have figured it out, the proc.num trigger accepts parameters , and even though they are optional to fill out, you must put commas if you opt to not enter them.So my trigger looks like proc.num[php,,]
|
|
|
02-12-2017, 10:28 AM
|
#14
|
LQ Veteran
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Rep:
|
whatever.
#leftswipe
|
|
|
All times are GMT -5. The time now is 11:48 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|