Архив категории ‘Linux’

Nagios style plugin for Solace Router monitoring

Tuesday, March 21st, 2017

Honor is dead. But I'll see what I can do.

Brandon Sanderson «Words of Radiance»

solace monitoringSolace documentation contains information on some Nagios integration options and a mythical plugin for monitoring Solace from Nagios. But this plugin can not be obtained from Solace site and even from Solace support. The exact quotation from Solace support sounds as "our Nagios plugins are not a product, they are projectware that we provide as part of a paid services engagement related to integration with Nagios". Quite uncomfortable, huh.

So I have prepared own Nagios style plugin (it can obviously be used in Icinga, Shinken etc.) which covers all our needs. It makes use of SEMPv1 management protocol. This protocol is described as legacy in the official documentation but SEMPv2 is not ready yet for usage.

 

(more…)

Метки: ,
Категория: Linux, Perl | Нет комментариев »


How to monitor Linux network quality for different directions

Wednesday, December 7th, 2016

The legends have two problems. They are not believed in or they are believed in too much.

Alexey Pehov «The Sentinel»

tcp-retrans

Sometimes we might need to know if the network connection between our host and other peers is good enough. The main quality attributes of the network connection are badwidth (quite easy to explore) and the packet loss rate (quite difficult to explore). Of course we can monitor the overall TCP retransmit rate (for example using something like netstat -s | grep -i retrans), build the graph and stare at it. But we'll never know which direction is loosing the packets and where is the problem itself.

I have not found the ready-to-use solution and created my own. You can see the results right here on the screenshot.

 

(more…)

Метки: ,
Категория: Linux, Perl | Нет комментариев »


Generate RPM SPEC changelogs in Git

Tuesday, November 8th, 2016

You have to be a bit of a liar to tell a story the right way.

Patrick Rothfuss «The Name of the Wind»

rpm-gitThis little note will be useful for those who is lazy enough for dealing with changelogs in RPM spec-files and lazy enough to implement own solution. I will present the script to work from inside the git repository. It can check if the changelog complies the current version and update the changelog accordingly if needed. No git tags are needed.

There are two variants of the script. One is for running on the build server (Jenkins/Bamboo/TeamCity…) right before building the RPM. And the second one is the post-commit hook. Second option can be useful if your build server has no write access to the repository or if you'd like to keep git history cleaner (this option doesn't create extra commits).

The script needs rpmspec utility to be installed. So if you are using some non-RH distro just look for the needed package. In Ubuntu you need the package named 'rpm'.

(more…)

Метки: ,
Категория: Linux | Нет комментариев »


How to pack Java Cryptography Extension (JCE) to JDK RPM

Friday, July 22nd, 2016

I don’t have problem. I am part of problem.

Daniel Keyes «The Minds of Billy Milligan»

jce

Let's imagine you have hundreds of hosts where you automatically install or update HotSpot JDK from the RPM-repository. For example, by RPM dependencies while installing or updating some another software. You maintain your repository by yourself and you'd like to have JDK and JCE in one RPM package.

Then this tiny article will help you.

(more…)

Метки:
Категория: Linux | Нет комментариев »


How to query MS SQL Server database from Linux CLI

Wednesday, June 15th, 2016

We have no need of other worlds. We need mirrors. We don't know what to do with other worlds.

Stanisław Lem «Solaris»

SQLServerLinuxSo let's assume that we need a small keyhole to look into SQL Server database and query some data from it. Maybe we'd like to automate some reporting stuff or to make some web GUI with some information stored in MSSQL. And of course we don't want to deal with Windows.

Fortunately there is such a project as FreeTDS. It gives us a driver for using with ODBC engine. I will show how to configure it and how to retreive some data right from MSSQL. 

Everything written below is true for the case of RHEL/CentOS 7.

(more…)

Метки:
Категория: Linux | Нет комментариев »


Some Jenkins Groovy magic

Tuesday, April 19th, 2016

— How does it feel?
— Groovy

Ash vs Evil Dead

groovyjenkinsThis is a short post with some Groovy snippets which can be used in Jenkins to perform some fancy stuff. They are tested in the real life and have proven their worth. I believe this is not the final release of this article 'cuz I am going to update it with some new examples as soon as I prepare them.

Let's see them.

 

(more…)

Метки: ,
Категория: Linux | Нет комментариев »


Links between Oracle and PostgreSQL, or There and Back Again

Thursday, September 24th, 2015

“I should like to know about risks, out-of-pocket expenses, time required and remuneration, and so forth” — by which he meant: “What am I going to get out of it? And am I going to come back alive?”

J.R.R.Tolkien «The Hobbit, or There and Back Again»

hobbit

Please don’t wait for any revelations from this article. This is just a compilation of some notes about configuring links between Oracle Database 11.2 and PostgreSQL 9.4. Everything written below is true for the case of Linux (RHEL/CentOS 7 to be exact) and I cannot guarantee its operability on other platforms or versions.

So let’s get to the point. In the first part of the article I will show how to configure the DB link from Oracle to PostgreSQL using ODBC driver and Oracle Heterogeneous Services (HS) agent. In the second part I will show how to access Oracle databases from PostgreSQL using foreign data wrapper (oracle_fdw).

(more…)

Метки: , ,
Категория: Linux, Oracle | 4 Комментариев »


Fcgiwrap, or How to run CGI-scripts without Apache and mod_cgi

Tuesday, August 25th, 2015

This buzz is not without the reason.

Soviet cartoon «Winnie the Pooh»

pooh-buzz

It’s definitely a bad idea to get Apache running only for executing some lightweight CGI-scripts. And it’s definitely a good idea to use Nginx where possible. But Nginx while being a perfect reverse proxy just cannot run GGI because of its event-based paradigm. This is the situation where the strengths become weaknesses. But we can still deal with this by virtue of some third-party tools like fastcgi wrappers. One of such tools is fcgiwrap server and in this post I’ll show how to build it and how to use it.

(more…)

Метки: , ,
Категория: Apache, Linux, Nginx | Нет комментариев »


Про Oracle, ASM, iSCSI и ядро 2.6.39-400

Monday, January 19th, 2015

Накормить дрянью так, чтобы все были в восторге – в этом кулинария схожа с политикой.

Святослав Логинов «Многорукий бог далайна»

oracle-bad Опять заметка про Oracle и опять в стиле "баги атакуют". Может, кому-нибудь пригодится. Итак, есть Oracle 11g, RAC (хоть это и не имеет значения) и группа дисков, получаемых по iSCSI и скормленных в ASM. Пока всё неплохо, но тут переходим к ключевому моменту: всё это работает на RHEL5 с UEK-ядром из ветки 2.6.39-400.

В какой-то момент становится понятно, что, если остановить iSCSI-таргет, с которого мы получаем диски, то, несмотря на normal redundancy и на наличие нескольких failgroups, инстанс ASM умирает, прихватывая с собой весь clusterware. Надёжность летит к чертям, кластер может упасть от любого чиха.

(more…)

Метки: ,
Категория: Linux, Oracle | Нет комментариев »


Автоматическое выкачивание новых серий любимых сериалов

Friday, November 7th, 2014

Извините! Я почему вредный был? Потому что у меня велосипеда не было! А теперь я сразу добреть начну.

м/ф «Трое из Простоквашино»

bicycleНекоторое время назад на некоторых ресурсах (в основном на Хабре) на глаза несколько раз попадались посты о том, как организовать автоматическое скачивание новых серий, которые появляются на сериальных торрент-трекерах. В основном речь шла о ресурсе lostfilm.tv, и суть метода состояла в периодическом парсинге RSS-ленты, обнаружении ссылок на новые серии нужных сериалов, скачивание торрент-файлов и подкладывании их в некоторое место, откуда их может забрать в работу торрент-клиент.

Идея показалась мне интересной, а реализация – скучной, так что мысль о своём велосипеде в фоновом режиме жила в голове несколько месяцев, а недавно за пару дней реализовалась в рабочий вариант.

 

(more…)

Метки: ,
Категория: Linux, Perl | 2 Комментариев »