SendMail Stat issues

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
mehal
Posts: 8
Joined: Fri Nov 25, 2005 4:38 am

SendMail Stat issues

Post by mehal »

Hello,

Im trying to get some stats on sendmail and i can't seem to get them working and i have no idea why.
Ive tried sendmail stats + mail scanner and read the topic over and over, just doesnt graph anything.

All i really need is the sent mail, but i need it asap before i do a mail out today if anyone could help that would be awesome!!! im using the latest version of cacti. on rhel3.

Cheers.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Switch logging level to DEBUG (Settings) first, for at least one polling cycle. Look at your cacti.log. Is the script called? What does it return? Does it update any rrd file?
Please post your findings
Reinhard
mehal
Posts: 8
Joined: Fri Nov 25, 2005 4:38 am

Post by mehal »

I think i know what the problem is but i dont know how to fix it,
I have managed to get the graphs up but they have no data, i checked the logs and the scripts run but snmp says;

WARNING: Result from SNMP not valid. Partial Result: No Such Object avail

That makes me think the script runs but i cant seem to get the results, doesnt matter if i change snmp versions e.g. v 1, v 2c

Im not too sure where to put the mods in the snmp.conf and which server do they go on the mail server or the cacti server? i tried both?

thank you for the help.

michael.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

mehal wrote:WARNING: Result from SNMP not valid. Partial Result: No Such Object avail

That makes me think the script runs but i cant seem to get the results, doesnt matter if i change snmp versions e.g. v 1, v 2c
No Such Object available says: You are asking for a OID that the client does not know. Unfortunately, I do not use the mailstats. But I tried some other snmp exec scripts.
Here's how to debug them:
1. When entering the exec function to the snmp agent on the remote host, you'll have to remember what OID you're using for that. Try to run the called script on that remote host from command line to be sure, it will respond. Then you'll have to refresh or stop/start the snmp daemon on that host to activate the change.
2. Then, please try to snmpwalk against that remote host with that OID from your cacti host.

Code: Select all

snmpwalk -v 1 -c <community> <remote host> <OID>
You'll see all OIDs returned. Now remember the OID for the return value you are interested in (if I'm remembering correctly, this ends with something like <OID>.101 or the like).
3. Please be sure, your parsing script on the cacti host uses THAT OID (if no parsing script: the OID is entered into the appropriate Data Template).
If in doubt, please post the results of steps 1-3
Reinhard
mehal
Posts: 8
Joined: Fri Nov 25, 2005 4:38 am

Post by mehal »

Hmmm....
Not sure i quite understand. Heres what i've done.

on the mail server;

entered
# Count the number of received messages in the last 5 minutes
pass .1.3.6.1.4.100.5 /bin/sh /opt/count_recv.sh
# Count the number of sent messages in the last 5 minutes
pass .1.3.6.1.4.100.6 /bin/sh /opt/count_sent.sh

I can run these scripts from bash ./count_sent.sh and get results. When I snmp on localhost (mail server) i still get SNMPv2-SMI::private.100.5 = No more variables left in this MIB View (It is past the end of the MIB tree).

The command i use is snmpwalk -v 1 -v (community) localhost .1.3.6.1.4.100.5

For this to work from cacti would these enteries have to be in the snmp.conf? I wouldnt think so?

Sorry about this but thank you for the help.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

mehal wrote:....
entered
# Count the number of received messages in the last 5 minutes
pass .1.3.6.1.4.100.5 /bin/sh /opt/count_recv.sh
# Count the number of sent messages in the last 5 minutes
pass .1.3.6.1.4.100.6 /bin/sh /opt/count_sent.sh
Looks fine. Did you remember to restart the snmpd on that host?
I can run these scripts from bash ./count_sent.sh and get results.
It would be helpful to paste the results from your command line exactly as they are. There are potential problems in formatting this (not wanting to offend you)[/quote]
For this to work from cacti would these enteries have to be in the snmp.conf? I wouldnt think so?
You will not have to modify anything in snmpd.conf of the cacti host (the computer, cacti is running on).
It may be wise to search the internet on OID .1.3.6.1.4.100 It may have been used before.
Reinhard
mehal
Posts: 8
Joined: Fri Nov 25, 2005 4:38 am

Post by mehal »

Nah its cool, i want all the help i can get. Thanks again for helping me.

Here are my results.
from bash#
snmpget -v 2c -c COMM IP .1.3.6.1.4.100.6
SNMPv2-SMI::private.100.6 = No Such Object available on this agent at this OID

Cacti log-

11/30/2005 09:55:02 PM - CMDPHP: Poller[0] Host[3] DS[82] WARNING: Result from SNMP not valid. Partial Result:
11/30/2005 09:55:02 PM - CMDPHP: Poller[0] Host[3] DS[81] WARNING: Result from SNMP not valid. Partial Result:
11/30/2005 09:55:02 PM - CMDPHP: Poller[0] Host[3] DS[80] WARNING: Result from SNMP not valid. Partial Result:
11/30/2005 09:55:02 PM - CMDPHP: Poller[0] Host[3] DS[79] WARNING: Result from SNMP not valid. Partial Result:

There are 4 scripts sent, recv, spam, virus....

Everytime i have mod the snmpd.conf i always restart the service.
I have put the entries in the sendmail server and have been trygin to snmpget from cacti server.

Does it matter if the scripts are exec or who owns them? e.g. -x o = root sort of deal?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Did you try running snmp v1 against that host? Will check this week at work how we're running this...
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests