Using IRC as a server management tool?

1

3

When I was visiting a small development house a few years back they used an IRC channel to monitor events on their servers e.g. build server, mail server, http server and specific processes like shell scripts or crontabs.

After an event had completed or encountered an exception then it would message and alert to the IRC channel which was short but descriptive.

I would like to implement something like this myself as I know have two servers which are becoming a bit tedious ssh'ing between to check stuff.

Tried a google search but I am getting back false positive results.

Is this a tool they are using or some scripting they have most likely used?

Thanks

tomaytotomato

Posted 2014-04-08T10:10:03.447

Reputation: 549

Can you mark something as solution? – davidbaumann – 2015-12-07T20:01:19.757

1Why not get proper monitoring tool specifically for this? Something like Munin. – phoops – 2014-04-08T10:13:02.657

Answers

3

You can join power of syslog with that syslog2irc
You can use syslog filter capabilities to direct messages, which you interested for, to different channels where they should be.

As example you may use logger to send log messages from scripts, also logger command may be used to send messages directly to syslog2irc (last needs to test, but should work).

So combination syslog-ng + syslog2irc + logger + ircserver looks promising for what you ask for.

MolbOrg

Posted 2014-04-08T10:10:03.447

Reputation: 212

1

You can use one of many available IRC Bots.
For example, the bot runs on every server, and joins a special irc channel on the irc server.

Your cron jobs write the information to a sqlite database, and the bot reads it and posts the message to the irc server.

davidbaumann

Posted 2014-04-08T10:10:03.447

Reputation: 2 089

1

I guess Syslog is exactly what you want. All logging is centralized on one server, and can be grabbed from there, filtered by "debug", alert...
You can also send your own messages to it.

As it's very common, there are many ways to evaluate the information coming from syslog.

davidbaumann

Posted 2014-04-08T10:10:03.447

Reputation: 2 089

1

You can simply use IRC with netcat:

echo 'USER bot bot2 botty botty2\nNICK bottty\nJOIN #CHANNEL\nPRIVMSG #channel :Some text!\nQUIT :All done\n' | netcat ircserver 6667

You can write simple bash scripts and insert variables.

wb7

Posted 2014-04-08T10:10:03.447

Reputation: 185