Sorry, I misread your message. Please ignore my post!
Ad Widget
Collapse
Complete recipe for monitoring DNS and NTP on your Network
Collapse
X
-
-
-
Ehm, how is your "way" different from what I proposed in my previous post?
The only difference I can see, is in the end where you write:
Instead of my approach:PHP Code:if($failed)
{
$val = 1;
} else {
$val = 0;
}
echo $val."\n";
The switching of 0/1 doesn't make any difference in how the script works. In my experience most of the default items in Zabbix return 0 when something is wrong.PHP Code:if($failed)
{
echo "0\n";
} else {
echo "1\n";
}
And the fact that you have attached a template for the item, doesn't really make any difference in my opinion, as it is very easy to just create one item, and then a trigger which acts upon the value of the item.Comment
-
Any difference to what? It may be very easy for you to create one item and a trigger for it to act upon but I followed tokind's directions to the T and it did not work for me. I tried implementing your script to work with his trigger, which he did not provide instructions on how to create the item, which I alerted him to. Still, the "Complete Recipe..." did not work for me, for whatever reason, with or without your script.Ehm, how is your "way" different from what I proposed in my previous post?
The only difference I can see, is in the end where you write:
Instead of my approach:PHP Code:if($failed)
{
$val = 1;
} else {
$val = 0;
}
echo $val."\n";
The switching of 0/1 doesn't make any difference in how the script works. In my experience most of the default items in Zabbix return 0 when something is wrong.PHP Code:if($failed)
{
echo "0\n";
} else {
echo "1\n";
}
And the fact that you have attached a template for the item, doesn't really make any difference in my opinion, as it is very easy to just create one item, and then a trigger which acts upon the value of the item.
For the other people like myself who tried following this thread to get DNS monitoring working and for whatever reason it won't work for them, instead of them scratching their heads, I give them an alternative which they can follow and hopefully avoid the hours of playing I had to do, to get it working. My instructions are for the people who are not great at code but still need to get DNS monitoring working with zabbix.
So if you meant no difference in the script, yes, I apologize, the guy I had look at it said that he changed the code around a lot, which is why I did not give you props and I also failed to compare the code when he was done.
But if you meant no difference in the information that I gave to set up DNS monitoring, I beg to differ as mine has the zabbix agent code, items and triggers which are unique to this thread, like your script was unique to tokind's original script.
Thank you for your php script, I'm sure people will appreciate it.Comment
-
Well, it was the "I think my way is better than all of these other ways" I was wondering about, as I couldn't see any other differences code-wise than the one mentioned, and that didn't make any difference on how well the script checked DNS servers.
I think that your choice of wording is wrong, compared to what you made different from the original post, but that may just be me...Comment
-
"Wrong" would be understandable if my words read "I think my SCRIPT is better than all of these other ways". But my words did not say nor read that way.Well, it was the "I think my way is better than all of these other ways" I was wondering about, as I couldn't see any other differences code-wise than the one mentioned, and that didn't make any difference on how well the script checked DNS servers.
I think that your choice of wording is wrong, compared to what you made different from the original post, but that may just be me...
Since you focused only on the code in your script and not the completely different and unique code from the zabbix_agentd.conf, items and triggers, it's understandable on how you formed that opinion.
The code contained in the template, no matter how easy or hard you say they are to write, is found no where else on this entire forum but in my post.
To me the differences contained in my post are enough to warrant saying "..my way is better..", since the way the zabbix server and zabbix agent communicate with your script is completely different than any code contained before then.Comment
Comment