LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 02-09-2017, 02:11 PM   #1
cbtshare
Member
 
Registered: Jul 2009
Posts: 641

Rep: Reputation: 42
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 05:16 PM.
 
Old 02-09-2017, 03:16 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 22,333

Rep: Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026
Quote:
Originally Posted by cbtshare View Post
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
 
Old 02-09-2017, 04:25 PM   #3
cbtshare
Member
 
Registered: Jul 2009
Posts: 641

Original Poster
Rep: Reputation: 42
Quote:
Originally Posted by TB0ne View Post
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
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.
 
Old 02-09-2017, 07:11 PM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 22,333

Rep: Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026
Quote:
Originally Posted by cbtshare View Post
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???
 
Old 02-09-2017, 07:58 PM   #5
cbtshare
Member
 
Registered: Jul 2009
Posts: 641

Original Poster
Rep: Reputation: 42
Quote:
Originally Posted by TB0ne View Post
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 View Post
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 View Post
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.
 
Old 02-09-2017, 08:40 PM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 22,333

Rep: Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026
Quote:
Originally Posted by cbtshare View Post
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.
 
Old 02-10-2017, 05:37 AM   #7
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Yawnstown, Ohio
Distribution: Mojave
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by cbtshare View Post
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 06:55 AM.
 
Old 02-10-2017, 09:29 AM   #8
cbtshare
Member
 
Registered: Jul 2009
Posts: 641

Original Poster
Rep: Reputation: 42
Quote:
Originally Posted by Habitual View Post
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 .
 
Old 02-10-2017, 10:07 AM   #9
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Yawnstown, Ohio
Distribution: Mojave
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
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 10:14 AM.
 
Old 02-10-2017, 10:47 AM   #10
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 22,333

Rep: Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026
Quote:
Originally Posted by cbtshare View Post
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 10:57 AM.
 
Old 02-10-2017, 11:57 AM   #11
cbtshare
Member
 
Registered: Jul 2009
Posts: 641

Original Poster
Rep: Reputation: 42
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 View Post
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
 
Old 02-10-2017, 12:02 PM   #12
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 22,333

Rep: Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026Reputation: 6026
Quote:
Originally Posted by cbtshare View Post
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 12:04 PM.
 
Old 02-11-2017, 11:20 PM   #13
cbtshare
Member
 
Registered: Jul 2009
Posts: 641

Original Poster
Rep: Reputation: 42
Quote:
Originally Posted by TB0ne View Post
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,,]
 
Old 02-12-2017, 11:28 AM   #14
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Yawnstown, Ohio
Distribution: Mojave
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
whatever.

#leftswipe
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
zabbix server and agent configuration yahoosam Linux - Server 3 10-24-2013 09:07 AM
unable to log in ZABBIX server Gil@LQ Linux - Software 0 05-29-2012 03:59 PM
New DHCP Server triggers a Printer and XP computer to Power Cycle pawprint_net Linux - Networking 12 11-17-2009 01:39 PM
Zabbix Server M_C Linux - Server 1 01-26-2009 09:48 AM
Sql Server 2000 create Triggers? ati Programming 1 05-20-2006 01:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration