Posts Tagged ‘colleagues’

Zabbix script to track arp address cache loss (arp incomplete) from Linux server to gateway IP

Tuesday, January 30th, 2024

Zabbix_arp-network-incomplete-check-logo.svg

Some of the Linux servers recently, I'm responsible had a very annoying issue recently. The problem is ARP address to default configured server gateway is being lost, every now and then and it takes up time, fot the remote CISCO router to realize the problem and resolve it. We have debugged with the Network expert colleague, while he was checking the Cisco router and we were checking the arp table on the Linux server with arp command. And we came to conclusion this behavior is due to some network mess because of too many NAT address configurations on the network or due to a Cisco bug. The colleagues asked Cisco but cisco does not have any solution to the issue and the only close work around for the gateway loosing the mac is to set a network rule on the Cisco router to flush its arp record for the server it was loosing the MAC address for.
This does not really solve completely the problem but at least, once we run into the issue, it gets resolved as quick as 5 minutes time. }

As we run a cluster environment it is useful to Monitor and know immediately once we hit into the MAC gateway disappear issue and if the issue persists, exclude the Linux node from the Cluster so we don't loose connection traffic.
For the purpose of Monitoring MAC state from the Linux haproxy machine towards the Network router GW, I have developed a small userparameter script, that is periodically checking the state of the MAC address of the IP address of remote gateway host and log to a external file for any problems with incomplete MAC address of the Remote configured default router.

In case if you happen to need the same MAC address state monitoring for your servers, I though that might be of a help to anyone out there.
To monitor MAC address incomplete state with Zabbix, do the following:
 

1. Create  userparamater_arp_gw_check.conf Zabbix script
 

# cat userparameter_arp_gw_check.conf 
UserParameter=arp.check,/usr/local/bin/check_gw_arp.sh

 

2. Create the following shell script /usr/local/bin/check_gw_arp.sh

 

#!/bin/bash
# simple script to run on cron peridically or via zabbix userparameter
# to track arp loss issues to gateway IP
#gw_ip='192.168.0.55';
gw_ip=$(ip route show|grep -i default|awk '{ print $3 }');
log_f='/var/log/arp_incomplete.log';
grep_word='incomplete';
inactive_status=$(arp -n "$gw_ip" |grep -i $grep_word);
# if GW incomplete record empty all is ok
if [[ $inactive_status == ” ]]; then 
echo $gw_ip OK 1; 
else 
# log inactive MAC to gw_ip
echo "$(date '+%Y-%m-%d %H:%M:%S')" "ARP_ERROR $inactive_status 0" | tee -a $log_f 2>&1 >/dev/null;
# printout to zabbix
echo "1 ARP FAILED: $inactive_status"; 
fi

You can download the check_gw_arp.sh here.

The script is supposed to automatically grep for the Default Gateway router IP, however before setting it up. Run it and make sure this corresponds correctly to the default Gateway IP MAC you would like to monitor.
 

3. Create New Zabbix Template for ARP incomplete monitoring
 

arp-machine-to-default-gateway-failure-monitoring-template-screenshot

Create Application 

*Name
Default Gateway ARP state

4. Create Item and Dependent Item 
 

Create Zabbix Item and Dependent Item like this

arp-machine-to-default-gateway-failure-monitoring-item-screenshot

 

arp-machine-to-default-gateway-failure-monitoring-item1-screenshot

arp-machine-to-default-gateway-failure-monitoring-item2-screenshot


5. Create Trigger to trigger WARNING or whatever you like
 

arp-machine-to-default-gateway-failure-monitoring-trigger-screenshot


arp-machine-to-default-gateway-failure-monitoring-trigger1-screenshot

arp-machine-to-default-gateway-failure-monitoring-trigger2-screenshot


6. Create Zabbix Action to notify via Email etc.
 

arp-machine-to-default-gateway-failure-monitoring-action1-screenshot

 

arp-machine-to-default-gateway-failure-monitoring-action2-screenshot

That's all. Once you set up this few little things, you can enjoy having monitoring Alerts for your ARP state incomplete on your Linux / Unix servers.
Enjoy !

Religulous – An Atheist movie preaching false ideas about Christianity – Religulous Orthodox Christian perspective

Thursday, July 31st, 2014

Religulous-anti-Christian-movie-Psalm-14-vers-1-the-fool-said-in-his-heart-there-is-no-God
Most of my colleagues at work know I am Christian and as we have our lunch  together almost daily, have a friend talks in our rest time etc. … it is quite normally we have talks on topic of philosophy and religion.

Most of them (like a lot of IT people have atheistic views as most people nowdays, even though I'm sure they believe deep in their hearts in good and wait / search for God's salvation and mercy.)
In that short talks often, I've been pranked, questioned and probably even thought crazy for believing in the Lord Jesus Christ and the Holy Gospel. That's okay as this is normal as in almost all ages Christians, were mocked for their faith by skeptics and disbelievers.

In our talks often, my colleagues try to convince me their believe "There is no God" and they think in a way that religion is only for old fashioned and stupid people, because they think the modern dilusion that science and religion are controversial.
Since some time one of my colleague tells me about an atheistic movie of an atheist who made a movie called Religulous. After, I've been told about the movie about 5 times, I decided to spend some and research on it, because I firmly believe it is the next "holywood" style easily digestable movie made "the holywood way". Below is my rationalization and findings about the movie.

The movie title Religulous is selected as a prank from the word "Ridiculous". Before you further read I warn you if you're an Orthodox Christian to not watch it for it is not worthy to spend 1:40 minutes of your wife watching such a nonsense.

Religulous is American documentary film from 2008, directed by Larry Charles and starring comedian Bill Maher. In the Movie Bill Maher travels to different religion holy places (Jerusalem, Vatican, Salt Lake city) and pranks interviewing believers from variety of religions believes. Uneasy questions misleading questions are asked to different people and he makes prank of answers. Of course it is very easy to make someone a fool who doesn't have idea about basics of world religions and present your arguments in a convincing way among people who doesn't have deep understanding on Christianity branches and history.

If one takes a quick time to research on who is Bill Maher, he finds he is a ardently liberal who has deep disrespect and hate for Christianity based on a personal bitter experience in Catholicism (curiously his mother is Jewish) and one finds Maher disregards Christianity not based on facts but on personal bitter experiences from Roman Catholicism.
In religulous it is preached, that religion must die to liberate the family from unneeded slavery which is pretty much what the communists in the bolshevik revolution believed – meaning his idea is nothing new but rebranded atheism. Just for information, there were people with such hatred and ideas during the last 2000 years, so somehow this guy, reinvents the steel.

In the movie Maher travels the world with director of  Borat Cultural Learnings of America for  Make benefit Glorious notion of Khazakstan – Larry Charles (which is another mockery "commedy" movie).
Even by reading IMDB movie description gives you idea the movie is not serious and it is highly ridiculous to use such non-sense to attack Christianity, along which civilization gravitated and thanks to which we have a well developed modern civilization.  What Maher claims is about  1/3 of population on earth – 2.5 billion are stupid and inferior to atheists).

Here is IDMB's storyline quote:

Bill Maher interviews some of religion's oddest adherents. Muslims, Jews and Christians of many kinds pass before his jaundiced eye. Maher goes to a Creationist Museum in Kentucky, which shows that dinosaurs and people lived at the same time 5000 years ago. He talks to truckers at a Truckers' Chapel. (Sign outside: "Jesus love you.") He goes to a theme park called Holy Land in Florida. He speaks to a rabbi in league with Holocaust deniers. He talks to a Muslim musician who preaches hatred of Jews. Maher finds the unlikeliest of believers and, in a certain Vatican priest, he even finds an unlikely skeptic.

It is obvious from this description that the movie is not to consider serious and what the people on this movie would say is not to be considered authoritative as they're not even theologians, but random people. Also what Maher did in this movie is to select weak and mixed people to mock intentionally Christianity.

Even though in the movie various religions are mocked the accent of his mockery is christianity and this is not a coincidense but because, Christianity has most adherents.
The movie is highly manipulative, just like another openly anti-Christian movie Zeitgeist.
The guy opens the movie with a scene on Megiddo, Israel with a false claim that the end of the world is going to happen on this place.

I have heard some protestant Christians took Revalation chapter of Holy Bible and interpret the written there about an End of the World all world armies battle. Actually I'm not aware that this idea is ever preached by any orthodox Christian priest, monk or elder but it is more a "free interpretation" of the holy scriptures by some protestant denomination.
Actually an interesting thing about Megiddo is on Megiddo is located the earliest Christian Church, so I guess it is a not a coincidense movie criticism starts from there. The first half of the film is mostly focused on evangelical Christians, how they believe in things like a 5,000-year-old earth, etc. Maher takes a trip to the Creation Museum in Hebron, Kentucky, where he interviews creationism guru Ken Ham against the backdrop of animatronic dinosaurs with saddles (for humans to ride on).
And he also interviews young-earth evangelical Mark Pryor, a democratic senator from Arkansas who creates some of the funniest moments of the film. To be fair, Maher also interviews Christian evolutionist Francis Collins, but he too comes out looking a bit buffoonish.

All along the journey, Maher and Charles jazz up the images with achingly sardonic voiceovers and music, and some very clever quick-cut editing (inserting 2 seconds of Charlton Heston-as-Moses at opportune moments, for example).

To show off his openness Maher, smokes pot on camera obviously preaching "freedom" the american way and live quickly and die rock'n'roll culture message. The movie is quite agressive and made in a way to make converts. The movie presents the so called self-fulfilling prophecies, believed and preached by people involved into experimental psychology (which nowdays uses early occult and shamanistic magical methods and whose practices are not based on science but on believe).

Of course to make such a movie look authentic, any connection with real historic facts in the movie are omitted.

Maher's thesis that all things evil and destructive are a result of religious delusion simply does not hold water historically!
There are already thousands of recent proofs, that lack-of religion is not panacea for all problems, take for example communism in Russia and the disbandlement of the USSR, Communistic China and the countraless atheistic regimes throughout history leading to violence and calamity in the world, totally outside of any religious motivation.

To make the non-sense movie more fun and convincing, the psychologic method of mockery is heavily used,  everything in the movie is presented in a commedy form.

Religulous a movie meant to make religious people look stupid, to "prove" that religious belief and intelligence are mutually exclusive.

Maher spends the second half of the film undermining religions and cults of every shape and size. He goes to Utah and skewers Mormonism, interviews Puerto Rican cult leader Jose Luis De Jesus Miranda (who claims to be the Antichrist), and even gets high with a leader of a religion based around marijuana. He goes to the Vatican and interviews some crazy Catholic priest, and Jerusalem to deconstruct Judaism and Islam. Maher is particularly hard on Islam, offering somewhat surprising pronouncements about the inherent violence and barbarism of that most touchy of all world religions. At moments like these, Maher might actually find allies in conservative Christian circles??

In the movie, during a debate with a Christian, Maher repeats a version of Christ myth theory derived from Gerald Massey's 1907 thesis that the myth of the Egyptian deity Horus was the source of the story of Jesus. He makes riduculous connection between the Book of the Dead and Jesus Christ.

It is pretty interesting that we Christians are often being blamed for evangelism and because of that most of Christians, fear to talk about their faith, just because true Christian faith and modern society living in confort does not align well together.

The inner essence of man is very similar in both atheists, christian, muslims, jewish, buddhists hindu etc. we are all looking for a higher meaning in life sooner or later in life. We all live by certain believes daily (I know atheists would ignore it but, a lot of the actions even the hardest atheist takes are pushed by certain belief system and faith in something (disbelieve in God is also a faith just like believe in God). Actually being an atheist is a tough thing, because atheists just like us christians spend time to reinforce their disbelieve with, stories, question and answer sessions, scientific facts.

Most of atheists fall in the trap of disbelieve either because they're dishonest in their research on is there God? or because events in their life turned in a way they didn't wanted too (because of lack of what saints call humility) or because they want to justify their bad deeds. Anyways for good or bad most of people who define themselves as atheists and follow the "spiritual wind of the times" are nowadays living in the well developed high economies world and it is interesting that in this parts of the world, people have as heritage to live with general Christian mentality and Christian mindset. Christian understanding of life in most countries full of atheists is so strongly rooted in society and culture, so even the biggest anti-christ or atheist has a tendency to do goo. That a lot of those atheists who disbelieve God actually do Christiain deeds not realizing a lot of their deeds paradoxally are deeds of people who actually believe there is God.

I've noticed there are at least 3 types of atheists:

  • Passive
  • Indifferent
  • Militant (Active)

My personal observations on Atheism (as an ex-atheist), is that atheists have minimal or wrong understanding on different religions and know nothing about Orthodox Christianity and most even didin't hear about its existence, from the movie I got the impression Maher also doesn't have

I think it is not righteous to criticize Christianity without even taking full time to study it. As Orthodox Christianity is hard to grasp and unpopular faith, often the image of modern Christian is made up by protestant Church denominations and even in best cases by Roman Catholic church, so most people in even officially christian protestant / catholic countries does not have the opportunity to see true Christian ascetic faith which is still present in the Orthodox Church.

The most common attack of an atheist against Christianity is using arguments about the Roman Catholic's Crusades and Inquisition, which were conducted by the Roman Catholic Church. Most Atheists however does not knowthat in Orthodox Church, there was no inquisition and no Crusades.
Even worse Roman Catholic crusaders came and invaded and killed orthodox christians in the same way they killed anyone who rejected to accept their faith, this act never happened in Orthodox Church.

Passive and indifferent atheists often, keep calm and either haven't thought whether there is God or don't take position when one talks about faith.
Often passive and indifferent atheists are amazed to learn things pointing them that there is God and that the holy writtings are true.

The Militant (active) atheist is a rare thing to see nowadays as people are tought to be tolerant and respectful to others, however if you start talking on topic that has to deal with faith, somehow a lot of atheists start being agressive and blame you and your faith for responsible for all the evils that happened in the world.

Often active atheists are such because of some personal problem or disappointed connected to Christianity just like Maher. 
Maher and other atheists like him start developing blaming attitude to the Lord and the Church. The fact that Christianity doesn't fit someone's desires doesn't mean it is true.

In the movie one sees quite of crazy people and religious leaders, which are either uninformed about their faith or suffer from some mental problems, as with most movies to discredit Christianity, Orthodox Christianity stand point on faith is not shown. Maher suggests, as a alternative method to faith, the method of doubt actually by creating such a movie with the aim to discredit religion, he demonstrates totally the opposite, as all his findings are based on his personal faith that "There is no God" and Christianity is based on fairy-tales.

Faith has difficulties, there are a lot of sick people in the Church, things are not ideal in christian-dome, and we have to be careful not to believe or follow blindly everything we hear, but I think Maher's attitude is seriously disrespectful to things and people's believe.

In the movie, a lot of the people to be interviewed were radical and the movie makes an image of Christianity as very radical, but Maher and his movie is just like as radical as them. It is fact that there is radical things in many of protestant christian denominations and many start-up (newly believed) Christians, have the tendency to be radical, however to make his point solid  I think, Maher should have interviewed stable and educated theologian and not look for the weirdiest individuals and places in the world.

And often try to look for arguments to approve their disbelieve (finding such arguments is a tought think and this is why a lot of people who try to look for arguments against Christ and Christianity – like me some 10 years ago often end up Christian). There is not one or two movies made on topic of "Scientific Atheism" in same spirit as Religulous, if one research on the facts presented in this movie he quickly understands a lot of the presented movie facts are either untrue or are true but have nothing to do with authentic Christianity which one can find in the most ancient of Churches Eastern and Oriental Orthodox Churches (like for example Syriac Orthodox and Copts).

Religulous and atheistic movies from its genre are not based on true facts either historical or scientific and even often doesn't follow strong rationalism  but more or less on particular person believe. They're looking to disprove God looking from answers in a very biased way.

I would close the post with a quote from the Holy Bible Psalms chapter, clearly addressing atheist people like Maher.
 

The fool hath said in his heart, there is no God.
Psalm 14:1

How to fix problems with encoding not showing umlauts in after import of sql data to MySQL

Thursday, October 1st, 2009

I’m restoring some websites from backups this days. One of the swiss websites had a serious problem with umlauts not showing up.
This happened right after I’ve used an old dump from a MySQL Server running version 4.x, the imported data was to MySQL server version 5. The problem consisted in that everywhere an umault was placed the shown content was ü.

You can imagine how annoying and ugly that looked, the whole text was crappy.
After some googling with a help of one of my colleagues (a programmer). I was pointed to this nice article Mysql Latin1 Utf8 Conversion .
What happens is that for some reason the dump I’ve made had latin1 character-set even though the data inside was in utf8.
Thus importing the dump would try to import the data as latin1 and make a crap out of it. The fix is as simple as substituting latin8 to utf8 in your mysql dump file and then reimporting it again.
In my case the browser displayed by default the website characters in iso8859 instead of utf8, so I had to specificly to change the browser encoding to UTF8 to realize all is okay.
Then it was necessery to modify all the templates to use UTF8 instead of the wrong character encoding. I have no clue how does it happened that the same umlaut encoding on the old server, what I suspect is there was something with the Apache’s default character encoding probably I have it set there by default set to utf8.
Well so far so good, let’s see how much trashy stuff I have to deal with today.
END—–

How to fix bug with WordPress domain extra trailing slash (Double wordpress trailing slash)

Monday, July 9th, 2012

How to fix bug with wordpress extra slash, domain double slash issue pic

2 of the wordpress installations, I take care for had been reported an annoying bug today by some colleagues.
The bug consisted in double trailing slash at the end of the domain url e.g.;

http://our-company-domainname.com//

As a result in the urls everywhere there was the double trailing slash appearing i.e.::

http://our-company-domainname.com//countact-us/
http://our-company-domainname.com//languages/

etc.

The bug was reported to happen in the multiolingual version of the wordpress based sites, as the Qtranslate plugin is used on this installations to achieve multiple languages it seemed at first logical that the double slash domain and url wordpress issues are caused for some reason by qTranslate.

Therefore, I initially looked for the cause of the problem, within the wordpress admin settings for qTranslate plugin. After not finding any clue pointing the bug to be related to qTranslate, I've then checked the settings for each individual wordpress Page and Post (There in posts usually one can manually set the exact url pointing to each post and page).
The double slash appeared also in each Post and Page and it wasn't possible to edit the complete URL address to remove the double trailin slashes. My next assumption was the cause for the double slash appearing on each site link is because of something wrong with the sites .htaccess, therefore I checked in the wp main sites directory .htaccess
Strangely .htacces seemed OKAY and there was any rule that somehow might lead to double slashes in URL. WP-sites .htaccess looked like so:
 

server:/home/wp-site1/www# cat .htaccess
RewriteEngine On
RewriteBase /

# Rewrite rules for new content and scripts folder
RewriteRule ^jscripts/(.*)$ wp-includes/js/$1
RewriteRule ^gallery/(.*)$ wp-content/uploads/$1
RewriteRule ^modules/(.*)$ wp-content/plugins/$1
RewriteRule ^gui/(.*)/(.*)$ wp-content/themes/$1/$2 [L]

# Disable direct acceees to wp files if referer is not valid
#RewriteCond %{THE_REQUEST} .wp-*
#RewriteCond %{REQUEST_URI} .wp-*
#RewriteCond %{REQUEST_URI} !.*media-upload.php.*
#RewriteCond %{HTTP_REFERER} !.*cadia.*
#RewriteRule . /error404 [L]

# Standard WordPress rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

Onwards, I thought a possible way to fix bug by adding mod_rewrite rules in .htaccess which would do a redirect all requests to http://www.our-company-domainname.com//contact-us/ to http://www.our-company-domainname.com//contact-us/ etc. like so:

RewriteRule ^/(.*)$ /$1

This for unknown reasons to me didn't worked either, finally thanks God I remembered to check the variables in wp-config.php (some month ago or so I added there some variables in order to improve the wordpress websites opening times).

I've figured out I did a mistake in one of the variables by adding an ending slash to the URL. The variable added was:

define('WP_HOME','http://our-company-domainname.com/');

whether instead it should be without the ending trailing slash like so:

define('WP_HOME','http://our-company-domainname.com');

By removing the ending trailing slash:

define('WP_HOME','http://our-company-domainname.com/');

to:

define('WP_HOME','http://our-company-domainname.com');
fixed the issue.
Cheers 😉

What’s goin on recently

Sunday, June 15th, 2008

At Saturday I had my first driving license. The instructor let me drive on the road for Balchik. Happily the driving went smoothly of course I made a lot of mistakes which is pretty normal for a first time driving. In the afternoon we went out for a walk with Niki. We just went out when Vlado (Hellpain) called, he came back to Dobrich for a day, we met for a coffee after which we stayed for 2 hours in the central park. Today as usual I attended the liturgy at the orthodox Church. Today it’s a big Christian Orthodox holiday, it’s the day in which the Our Lord Jesus Christ send the Holy Spirit to the early Church fathers (the apostles). The apostles heard a great noise and they see the Holy Spirit descending from heaven in a form of burning tongues, each tongue coming above the head of each of the apostles and the rest of the first believers in our Lord and Saviour Jesus. I’m still in doubt should I decide to go or not to the Netherlands. I applied for a room there through http://vivare.nl yesterday. But still haven’t received a confirmation for approval and I haven’t send a deposit for a room. I made research about the Arnhem Business School (ABS) and talked and I’m talking with a friend who went to study in Holland the last year. In the afternoon I watched an old russian movie which is marked as a SCI-FI genre (Kin Dza Dza), I got the title from the top 20 in IMDB. Yeah I can say that the movie was pretty freaky :). Vladi did call me again and said one of the servers in the office had crashed I spoke with of my colleagues with a request to go to the office and restart the box but it seems the box isn’t booting. Tomorrow I’ll catch an early bus for Varna and went to the office to see what’s wrong with the machine (hope it’s not a serious hardware problem). That’s most of it. To be honest although God grants me a lot of his divine grace I still feel a bit of lost and pathless and struggle to fight my lack of faith, and bad habits. I’m praying everyday for a physical healing but I still haven’t completely recovered from my sickness. I have sinned badly in my past and I deserve to have that sickness but still I honestly I’m repenting day after day for my bad life in the past and the near present … Another think I should say is that a friend of mine has died I saw his obituary hanging on a tree 🙁 , His name was Alexander (Sashe) known among us by the nickname (Saketo), he was a drug addict and that killed him I hope he is with God know peace be upon him. END—–