HOWTO: SpamAssassin monitoring via SIM

So I re-did EVERYTHING and am getting this:

[root@server1 serv]# sim -v
Warning: bad syntax, perhaps a bogus ‘-’? See /usr/share/doc/procps-3.2.3/FAQ
'usr/local/sim/internals/chk/serv/spam.chk: line 1: syntax error near unexpected token { 'usr/local/sim/internals/chk/serv/spam.chk: line 1: chk_spam() {
/usr/local/sbin/sim: line 182: chk_spam: command not found
[12/02/06 13:00:02]: MYSQL service is online.
[12/02/06 13:00:02]: XINET service is online.
[12/02/06 13:00:02]: XINET service is online.
[12/02/06 13:02:23]: LOAD 0.68 (status good)
[12/02/06 13:02:23]: NETWORK is online.
[12/02/06 13:02:23]: FTP service is online.
[12/02/06 13:02:23]: HTTP service is online.
[12/02/06 13:02:23]: SSH service is online.
[12/02/06 13:02:23]: MYSQL service is online.
[12/02/06 13:02:23]: XINET service is online.

Is this with Les enabled or disabled?

les disabled.

Open a ticket with your root login information and I’ll take a quick peek.

I just tried this on one of our boxes and it worked great! Thanks!!

A bit more help!

Hey, first of all, thanks so much for the tutorial!! It really helped alot! But I have request… [SIZE=3]

I need SIM to restart spamassassin service on high loads (5+) and restart the server on severe loads (10+)

I have no idea what code to add to where…

Think your up for it?

Thanks in advance :D:D
[/SIZE]

What about adding iworx and clamd to sim? (They’re not included now, as I understand it)

Is Spamassassin included with SIM in interworx 3? I checked the sim conf-files and didn’t see it in there.

SpamAssassin is not included in IWorx 3. SIM is a separate package from InterWorx, but we may consider adding it to the SIM package in the future.

Adding all services that are vital for the running of Iworx (inclusive IWORX itself) into SIM would be very nice indeed. This way it is no catastrophe if the iworx-related processes go down. As it is now, iworx needs to be restarted manually if it stalls.

[QUOTE=verantis;13604]Hey, first of all, thanks so much for the tutorial!! It really helped alot! But I have request… [SIZE=3]

I need SIM to restart spamassassin service on high loads (5+) and restart the server on severe loads (10+)

I have no idea what code to add to where…

Think your up for it?

Thanks in advance :D:D
[/SIZE][/QUOTE]

Haven’t actually tried this, but according to the SIM docs, this is possible. I would look in /usr/local/sim/conf.sim, and check out the following config values:


# Here we edit the parameters for our system load module
#
# This module will in due time be completely redone but for now
# it serves the purpose and works reasonable well....

WARN_LD="15"              # max load value before status warning (5 minute load avg.)
CRIT_LD="20"              # max load value before status critical (5 minute load avg.)

and


WARN_CMD=". $INSPATH/internals/chk/sys/lm/warn.lm"      # command to execute at load status warning
CRIT_CMD=". $INSPATH/internals/chk/sys/lm/crit.lm"      # command to execute at load status critical

Note that $INSPATH is /usr/local/sim, and that the warn.lm and crit.lm files already have code in it, so you may want to add to those files instead of replacing them.

Regardless, I would still read through the conf file very carefully before making any changes, and make sure you have a backup plan if something goes wrong.

Hope that helps,
Socheat

Thanks for your swift reply!

I’ll try it as soon as I get to work, and let you know how it turns out.

-Drew

Btw, that was exactly it, thanks alot!

I also needed to turn on load monitoring, haha…

I just threw this in and it worked like a charm, thanks Socheat! (now fix iworx, proftpd and clamd in sim too and I’ll be a happy camper ;))