LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-19-2006, 02:29 PM   #1
VeeDubbs
Member
 
Registered: Feb 2006
Location: Wisconsin
Distribution: SuSe 10. Ubuntu
Posts: 47

Rep: Reputation: 15
Big Brother 1.9i help


Hello all,

I just recently finished setting up a Big Brother server. The last thing I am trying to setup is the e-mail notifications; this part does not want to work for me! I have edited the bbwarnrules.cfg files to e-mail me when a device goes down. I have even brought devices down to see if BB would notice the event. BB does notice it (turns page red, red x, etc), but, I never get an e-mail notification (waited around 30 minutes before bring the device back up). My question is, is there something local to the machine (not even in the BB config) that must be setup for the machine to be able to send e-mails? I'm sort of a n00b, so be nice . Hopefully someone here can help me!! Thanks!

EDIT: I am using Fedora Core 4.

Last edited by VeeDubbs; 04-19-2006 at 02:31 PM.
 
Old 04-19-2006, 10:47 PM   #2
VeeDubbs
Member
 
Registered: Feb 2006
Location: Wisconsin
Distribution: SuSe 10. Ubuntu
Posts: 47

Original Poster
Rep: Reputation: 15
Bump...anyone?
 
Old 04-19-2006, 11:08 PM   #3
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,285

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Not sure about BB version 1.9 specifically, but the version I bought at work (I don't remember the version right no, I'm at home) logs notification attempts. From you bb directory go up one level and there (hopefully) will be a "bbvar" directory. Go there, and then to it's subdirectory "acks". Then a file named "notifications" from there. I believe that's it - not having my work system handy to verify at the moment. Messaging attempts should be logged to that notifications file. First verify that BB is trying to send a message in the first place, and then we can move on from there. BB only sends notifications on red conditions, not yellow, unless they've changed that in newer versions. The message sending mechanism is (was) very simple. Just a shell script in the bb/ext directory if I remember. I've somewhat forgotten the default BB behavior after this, because I totally rewrote the notification system myself. I seem to remember the default was extremely trivial shell scripts pulling info to send out of environmental variables.

If your BB logfile shows it tried to send a notification, it could be your bbwarnrules.cfg that is incorrect. Post the rule you're expecting to trigger (from bbwarnrules.cfg) and I'll give it a look-see for obvious problems. I also seem to remember you have to globally turn notifications on. Some other file I can't remember the name of, but it would be in that same etc directory and probably has "warn" included somewhere in the filename. It's been years since I set that part of BB up, so my memory is fuzzy, but I can refresh my memory tomorrow at work if you'd like.
 
Old 04-20-2006, 09:20 AM   #4
VeeDubbs
Member
 
Registered: Feb 2006
Location: Wisconsin
Distribution: SuSe 10. Ubuntu
Posts: 47

Original Poster
Rep: Reputation: 15
Thank you for your response haertig! I took a look into /bbvar/acks and found my notifications.log filled with a lot of stuff such as:

Code:
Tue Apr 18 10:05:20 2006 Johnson3.conn (999999999999) myemail@domain.com 1145372720 500
Tue Apr 18 10:44:45 2006 Johnson-W4D.telnet (010016000017) myemail@domain.com 1145375085 723
Tue Apr 18 10:49:37 2006 Johnson-W2D.telnet (010016000011) myemail@domain.com 1145375377 723
Tue Apr 18 20:09:38 2006 Johnson-W2D.telnet (010016000011) myemail@domain.com 1145408978 723
Wed Apr 19 08:44:38 2006 Johnson-W2D.telnet (010016000011) myemail@domain.com 1145454278 723
Wed Apr 19 14:55:12 2006 Johnson-W1D.telnet (010016000009) myemail@domain.com 1145476512 723
Wed Apr 19 15:19:38 2006 Johnson-W2D.telnet (010016000011) myemail@domain.com 1145477978 723
Wed Apr 19 18:34:50 2006 Johnson-W1D.telnet (010016000009) myemail@domain.com 1145489690 723
Thu Apr 20 03:14:39 2006 Johnson-W2D.telnet (010016000011) myemail@domain.com 1145520879 723
That is only a portion of it - it had a lot more in it...so it appears as if it is attempting to send something to me, however, it is not getting there (which is my problem!!!!). Also, here are the lines from bbwarnrules.cfg:

Code:
*;;*;;*;*;myemail@domain.com

# notify-admin;;pagehelp;;*;*;myemail@domain.com

# unmatched-*;;*;;*;*;myemail@domain.com
I have the last two lines commented out, because I don't believe I need them. But there it all is. I hope this helps you, because I really need your help. Thanks again!

FYI: I'm sure you realize this, but that is not my real email addy. In the config files I do have my real addy, but it does not work.
 
Old 04-20-2006, 11:31 AM   #5
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,285

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
That global "turn the notifications on" file I was thinking of is .../bb/etc/bbwarnsetup.cfg You need to have a line in there that says "bbwarn=true". You probably do, since you're getting entries in you notifications.log file. But it might be that notifications.log is updated even if this flag is turned off. It would be good to check.

If that part looks good for you, I'd next try to create a test notifications script. Go to the directory .../bb/ext/pg and create a file named "bbtest" and put the following in that file:
Code:
env > /tmp/bbtest.$$
Make the file executable. Then add the following to .../bb/etc/bbwarnrules.cfg:
Code:
*;;*;;*;*;ext-bbtest-myemail@mydomain.com
If you had to add that "bbwarn=true" to the bbwarnsetup.cfg file, restart Big Brother (maybe this isn't required, but it won't hurt):
Code:
.../bb/runbb.sh stop
.../bb/runbb.sh start
Now start looking at your /tmp directory for creation of those "bbtest" files. Don't forget to turn this test off after you're done. You could fill up /tmp very rapidly! If you find those bbtest files, your problem is probably in the enviroment. That's why we put the "env" command in that test script. Edit one of those bbtest files and peruse the environment it displays. You should see things like BBTMP, BBSVCNAME, BBALPHAMSG, etc. And an all-important one ... MAIL ... this is the environment variable that BB will use to invoke the program that actually sends you the email.

Enough for now. Report back on your findings.

BTW, it looks like I'm using BB version 1.9 also. My install is four years old, but I guess 1.9 is still the current version. I've modified mine pretty significantly however, in the notifications and test scripts areas.
 
Old 04-20-2006, 12:31 PM   #6
VeeDubbs
Member
 
Registered: Feb 2006
Location: Wisconsin
Distribution: SuSe 10. Ubuntu
Posts: 47

Original Poster
Rep: Reputation: 15
Still having problems..and am getting very frustrated! But thank you very much for all your help still. Okay, I went the
/bb/bb/ext/pg directory
Code:
[root@bigbrother pg]# pwd
/home/bb/bb/ext/pg

[root@bigbrother pg]# ls -l
total 16
-rwxr-xr-x  1 root root   21 Apr 20 09:54 bbtest
-r-xr-xr-x  1 1062  515 1289 Dec 30 22:24 ex1
-r-xr-xr-x  1 1062  515 1258 Dec 30 22:24 ex2
-r-xr-xr-x  1 1062  515 1587 Dec 30 22:24 ex3

[root@bigbrother pg]# cat bbtest
env > /tmp/bbtest.$$
and made the bbtest file. I then went into the /tmp directory to see if anything happened...
Code:
[root@bigbrother ~]# cd /home/bb/bb/tmp

[root@bigbrother tmp]# ls
BB  np_myemail@domain.com_Johnson-W4A.conn

[root@bigbrother tmp]# cat BB
Johnson-W4A.conn

[root@bigbrother tmp]# cat np_myemail@domain.com_Johnson-W4A.conn
6924010 Johnson-W4A.conn red myemail@domain.com
I'm assuming I should be seeing more than just these two files...I have no clue what is going on. It doesn't even seem that the test files are getting through now. I did do ./bbtest while in the /ext directory. Is there anything else I should have done?

EDIT: I did have the "bbwarn=true" line in bbwarnsetup.cfg.
Thanks again!

Last edited by VeeDubbs; 04-20-2006 at 12:32 PM.
 
Old 04-20-2006, 12:41 PM   #7
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,285

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Code:
# cat bbtest
env > /tmp/bbtest.$$
I then went into the /tmp directory to see if anything happened...
# cd /home/bb/bb/tmp
# ls
You code in that bbtest script is creating a file in the /tmp directory, but it appears you are looking for the file in the /home/bb/bb/tmp directory. These are two different places.
 
Old 04-20-2006, 12:57 PM   #8
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,285

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Quote:
Originally Posted by VeeDubbs
...and made the bbtest file. I then went into the /tmp directory to see if anything happened...
Don't forget that you have to tell Big Brother to INVOKE you test script, by adding this to your bbwarnrules.cfg file:
Code:
*;;*;;*;*;ext-bbtest-myemail@mydomain.com
 
Old 04-20-2006, 01:01 PM   #9
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,285

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Quote:
I did do ./bbtest while in the /ext directory.
This should have created one of those /tmp/bbtest.* files. HOWEVER, the one this created would reflect the environment you had running at the command line, NOT the environment that Big Brother would be running under while trying to send you an email. I would suggest you manually remove any /tmp/bbtest.* files you find and start again from scratch, letting Big Brother automatically create the files. Otherwise you stand a good chance of confusing yourself if you view the wrong bbtest file. You may not be looking at the environment that you THINK you are looking at...
 
Old 04-20-2006, 01:03 PM   #10
VeeDubbs
Member
 
Registered: Feb 2006
Location: Wisconsin
Distribution: SuSe 10. Ubuntu
Posts: 47

Original Poster
Rep: Reputation: 15
Alright, well that was retarded of me. But, an easy fix! Now, in the bbtest files it says MAIL=/var/spool/mail/root. But, from what I know, that is just the mail that the local root user gets, right? Are you saying this should be set to envoke sendmail somehow? How do I go about that? Should the MAIL variable be set to /usr/lib where there is a sendmail and a sendmail.sendmail? I think we may be getting somewhere?

EDIT: Ok, ignore most of what I wrote above. I have been doing
./bbtest which would result in one of those bbtest files showing up in the /tmp directory. However, now that I have not done that anymore; no bbtest* files are being created in the *correct* /tmp directory. I think I have more problems than BB on my hand...something with sendmail or some other config isnt right!

Last edited by VeeDubbs; 04-20-2006 at 01:29 PM.
 
Old 04-20-2006, 01:29 PM   #11
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,285

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Quote:
Originally Posted by VeeDubbs
Now, in the bbtest files it says MAIL=/var/spool/mail/root.
This is your problem. Normally, what you are seeing is exactly what you'd expect your MAIL environment variable to be set to (if you're running as root, that is!)

However, Big Brother usurps the normal setting for MAIL and sets it differently for it's own purposes. This is done in Big Brother's file .../bb/etc/bbsys.sh Search that file for "MAIL" and you'll see this being done. In my Big Brother environment, this is the setting:
Code:
MAIL="/usr/bin/mail -s
And here's a sample of Big Brother code that uses the MAIL variable. You can see based on how it's being used that it is NOT the standard setting for MAIL that normal users see. It's not the setting that YOU are seeing in your test. The following is a snippet of code from the .../bb/ext/pq/ex0 file:
Code:
if [ "$RECOVERED" = "1" ]
then
        echo "${DOWNSECSMSG}" | $MAIL "!BB! $BBSVCNAME recovered" "$RCPT"
else
...
What you're finding here tells me that your Big Brother environment is not correct. I doubt you can fix this by simply setting a different MAIL variable. Maybe ... but I expect your entire Big Brother enviroment is not correct. I would expect other problems besides just this MAIL thing. This may have been something you messed up when you installed it. You shouldn't have to be calling bbsys.sh manually. There are other files that setup BB environment too, and you shouldn't need to call these manually either. Examples being .../bb/etc/bbdef.sh and .../bb/etc/bbinc.sh

One thing to verify first ... this bbtest.* file you are looking at, it IS one that was created by Big Brother automatically, RIGHT??? It's not one that you might have created MANUALLY when you ran that ./bbtest script from the command line, RIGHT??? This confusion about what environment you are looking at is the point I was trying to make a post or two back, when I said to delete any /tmp/bbtest.* files and start again from scratch.
 
Old 04-20-2006, 01:54 PM   #12
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,285

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Quote:
Originally Posted by VeeDubbs
no bbtest* files are being created in the *correct* /tmp directory. I think I have more problems than BB on my hand...something with sendmail or some other config isnt right!
The problem would not be in sendmail. The purpose of that bbtest script was to take sendmail out of the picture. This still could be an environment thing. BB's environment may not allow it to find this bbtest script OR the normal emailing scripts (ex0, ex1, etc.)

You appear to be running your investigation as root. Are you running Big Brother itself as root? If so, there may be additional requirements related to that that are causing your problems. I don't know about this, I'm just speculating. I do not run my BB daemons as root. Some specific tests I run require root privileges, but I handle that in the scripts themselves ... not by running the overall BB system as root.
 
Old 04-20-2006, 02:26 PM   #13
VeeDubbs
Member
 
Registered: Feb 2006
Location: Wisconsin
Distribution: SuSe 10. Ubuntu
Posts: 47

Original Poster
Rep: Reputation: 15
Alright, thanks for all your help - but I think I've invested too much time on this already and am about ready to give up. Everything but e-mail is working, and although that would be nice to have - it's not a neccessity. FYI, in the bbsys.sh file my MAIL was also set to /usr/bin/mail -s. I have not been running BB as root - i created a bb user account and it is running under that - it is set to not let it be run as root as well. I did go back as you say and deleted the bbtest.* files and no longer invoked it with ./bbtest - that is when no more bbtest.* files would show up in the /tmp directory. I think you are right - I think my install was kind of sloppy. Just curious - should this (or did it for you) e-mail notification "work out of the box" with little to no configurations?

Heres a thought - while going through all of this I have been starting and stopping the sendmail service...and at times I would be doing an Ethereal capture. And within like 11 seconds I would have easily 1000 UDP packet captures - mostly all going between my BB server and our internal DNS server.

Hopefully I can write this clear enough...originally in the install of my BB server i gave it a hostname of bigbrother@mydomain.com. And by default in the /etc/resolv.conf file the first line is search mydomain.com. So in Ethereal I am seeing DNS queries for mydomain.com.mydomain.com. That may be messing it up? So I changed my hostname to just bigbrother. I also put our internal DNS IP address as the second line in the /etc/resolv.conf. Anything wrong with any of that?

Also, I am seeing in my user bb's mail attempts to send the mail...but it looks as though it is failing. Here is a typical section:
Code:
From MAILER-DAEMON@bigbrother.mydomain.com  Thu Apr 20 12:23:03 2006
Return-Path: <MAILER-DAEMON@bigbrother.mydomain.com>
Received: from localhost (localhost)
        by bigbrother.mydomain.com (8.13.4/8.13.4) id k3KHN3Zu030905;
        Thu, 20 Apr 2006 12:23:03 -0500
Date: Thu, 20 Apr 2006 12:23:03 -0500
From: Mail Delivery Subsystem <MAILER-DAEMON@bigbrother.mydomain.com>
Message-Id: <200604201723.k3KHN3Zu030905@bigbrother.mydomain.com>
To: <bb@bigbrother.mydomain.com>
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
        boundary="k3KHN3Zu030905.1145553783/bigbrother.mydomain.com"
Subject: Returned mail: see transcript for details
Auto-Submitted: auto-generated (failure)

This is a MIME-encapsulated message

--k3KHN3Zu030905.1145553783/bigbrother.mydomain.com

The original message was received at Thu, 20 Apr 2006 12:23:03 -0500
from localhost [127.0.0.1]

   ----- The following addresses had permanent fatal errors -----
<mmcgrath@mydomain.com>

   ----- Transcript of session follows -----
550 5.1.2 <mmcgrath@mydomain.com>... Host unknown (Name server: mydomain.com: host not found)

--k3KHN3Zu030905.1145553783/bigbrother.mydomain.com
Content-Type: message/delivery-status

Reporting-MTA: dns; bigbrother.mydomain.com
Received-From-MTA: DNS; localhost
Arrival-Date: Thu, 20 Apr 2006 12:23:03 -0500

Final-Recipient: RFC822; mmcgrath@mydomain.com
Action: failed
Status: 5.1.2
Remote-MTA: DNS; mydomain.com
Last-Attempt-Date: Thu, 20 Apr 2006 12:23:03 -0500

--k3KHN3Zu030905.1145553783/bigbrother.mydomain.com
Content-Type: message/rfc822

Return-Path: <bb@bigbrother.mydomain.com>
Received: from bigbrother.mydomain.com (localhost [127.0.0.1])
        by bigbrother.mydomain.com (8.13.4/8.13.4) with ESMTP id k3KHMccA030684
        for <mmcgrath@mydomain.com>; Thu, 20 Apr 2006 12:23:03 -0500
Received: (from bb@localhost)
        by bigbrother.mydomain.com (8.13.4/8.13.4/Submit) id k3HN5eEi028805
        for mmcgrath@mydomain.com; Mon, 17 Apr 2006 18:05:40 -0500
Date: Mon, 17 Apr 2006 18:05:40 -0500
From: bb@bigbrother.mydomain.com
Message-Id: <200604172305.k3HN5eEi028805@bigbrother.mydomain.com>
To: mmcgrath@mydomain.com
Subject: !BB - 1547110! Denhart_Main.conn - 500999999999999

[1547110]  Denhart_Main.conn purple Mon Apr 17 13:54:47 CDT 2006 Connection OK
PING 10.18.0.1 (10.18.0.1) 56(84) bytes of data.
64 bytes from 10.18.0.1: icmp_seq=0 ttl=254 time=0.817 ms

--- 10.18.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.817/0.817/0.817/0.000 ms, pipe 2

Please see: http://bigbrother.mydomain.com/bb/html/Denhart_Main.conn.html


--k3KHN3Zu030905.1145553783/bigbrother.mydomain.com--
Hopefully this gives a little more info...but like I said - I am more or less ready to give up. So, if you're sick of helping me...thanks for everything so far!
 
Old 04-20-2006, 03:31 PM   #14
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,285

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Here's a couple of thoughts.

Quote:
while going through all of this I have been starting and stopping the sendmail service
This won't make any difference. You don't need the sendmail daemon running to send mail (kind of counterintuitive, huh?) You need the daemon running to receive or relay mail, but not to send it. Unless you have your app configured to directly run SMTP to localhost:25 This is assuming sendmail itself (not the daemon) was configured correctly in the first place. I am not an expert on sendmail.

Quote:
Just curious - should this (or did it for you) e-mail notification "work out of the box" with little to no configurations?
It worked for me out of the box, but of course I had to configure those bbwarn* files. This is running on a large Solaris box, and I am not the one who configured sendmail however. But I can tell you positively that there is no sendmail daemon running - we killed this for security reasons - and BB can still send outgoing email just fine.

Earlier I said your problem wasn't sendmail. That comment was based on your report that the bbtest script did not work either (bbtest doesn't require sendmail). However, the email headers you quoted make my comment incorrect.
Code:
   ----- Transcript of session follows -----
550 5.1.2 <mmcgrath@mydomain.com>... Host unknown (Name server: mydomain.com: host not found)
Obviously BB is managing to get sendmail invoked in your case. The reason why bbtest did not work for you is probably due to some other error that we've overlooked. The point of bbtest was to see if we were getting somewhere, but not all the way to sendmail. Your email quote makes that bbtest script moot. We KNOW we're getting to sendmail, and it's failing after that. No more need for bbtest, and no need to try figuring out why it didn't work (that is irrelevent now).

Regarding your questions on DNS, I'm afraid I can't offer much help there. I do not have a local DNS setup on my home LAN (where I am the admin), and on our big servers at work we have professional sysadmins (meaning: "not me"). So while I know a little about DNS setup, I have no practical experience setting it up, so it's best if I shut up regarding DNS. I would surely lead you astray.

What I would do, to try to isolate a DNS problem in your case, is configure bbwarnrules.cfg to send notifications to your local address on the box. Not "myemail@mydomain.com". Just to plain old "myemail", assuming "myemail" is a valid userid on the local system. My troubleshooting thoughts being, "keep simplifying until it works, and then start backing up to see when it begins failing again". Sending stuff to "myemail" rather than "myemail@mydomain.com" simplifies things greatly, and may help isolate the specific problem spot that's getting you.

BTW, you give up too easily!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Configuring Big Brother- URGENT deepanvenkatesh Linux - Software 2 01-06-2006 02:20 AM
Big Brother is watching what you print d00bid00b General 72 10-26-2005 10:42 AM
[Q] Big Brother System Monitoring TheEdge Linux - Software 1 03-26-2005 09:03 AM
Big Brother Bill Gates Edward78 General 9 12-10-2002 11:18 PM
Big brother KevStA General 12 05-28-2002 03:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration