Monitoring Exchange 2003 from Linux Cacti

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
argon0
Cacti User
Posts: 460
Joined: Fri Mar 12, 2004 1:22 pm

Post by argon0 »

Yup it is, something I'm working on - but had to put on the back burner for a bit. It should be pretty easy, just use the counter "total number of messages sent" from perfmon (this is from memory, so please forgive me if I get it wrong) and then tell Cacti its a counter rather than a guage.

As said I'm working on it, and will publish a template when I finish it - unfortunately "real" work calls at the moment...
No longer a n00by, probably, by now an 0ldby

Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
kharford
Cacti User
Posts: 50
Joined: Thu Jul 07, 2005 11:53 am
Location: Mass, USA

Post by kharford »

Hi All,
I can't figuire out what I am doing wrong. When I run the script from the command line I do get data from the exchange server.

Here is my log output:

03/21/2006 06:00:11 PM - CACTID: Poller[0] Host[60] DS[861] SCRIPT: perl /var/www/html/cacti-0.8.6h/scripts/exchange_emails_scriptv2.pl , output: U
03/21/2006 06:00:11 PM - CACTID: Poller[0] Host[60] DS[861] WARNING: Result from SCRIPT not valid. Partial Result: ...
03/21/2006 06:00:11 PM - CACTID: Poller[0] Host[60] ERROR: Empty result []: 'perl /var/www/html/cacti-0.8.6h/scripts/exchange_emails_scriptv2.pl'
03/21/2006 06:00:11 PM - CACTID: Poller[0] Host[60] DEBUG: The POPEN returned the following File Descriptor 6


Any ideas?

KMH
argon0
Cacti User
Posts: 460
Joined: Fri Mar 12, 2004 1:22 pm

Post by argon0 »

Which version of Cactid?

If its the most recent (.8.6g(?)) then in your data input method you need to specify the path to perl

In my set up the command line is:

/usr/bin/perl /var/www/html/scripts/exchange_emails_scriptv2.pl <hostname>

Argon0
No longer a n00by, probably, by now an 0ldby

Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
kharford
Cacti User
Posts: 50
Joined: Thu Jul 07, 2005 11:53 am
Location: Mass, USA

Post by kharford »

Argon0,

The perl path did it.

Much thanks

KMH
argon0
Cacti User
Posts: 460
Joined: Fri Mar 12, 2004 1:22 pm

Post by argon0 »

Goodo!
No longer a n00by, probably, by now an 0ldby

Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
User avatar
streaker69
Cacti Pro User
Posts: 712
Joined: Mon Mar 27, 2006 10:35 am
Location: Psychic Amish Network Administrator

Post by streaker69 »

Is there anything else that needs to be done on the server for these graphs to work?

I've installed the NSClient and have it running as a Service and installed the WMISNMP for Win2k from MS's site. All the templates and scripts are where they're supposed to be with appropriate permissions, but it doesn't appear as though I'm getting any data from the IMF script.

I'm just wondering if there is something else that I missed that needs to be configured on the server itself for the script to pick up.

Thanks, and great work on the templates.
User avatar
streaker69
Cacti Pro User
Posts: 712
Joined: Mon Mar 27, 2006 10:35 am
Location: Psychic Amish Network Administrator

Post by streaker69 »

Ok, now here's my problem. I can run the scripts manually and retrieve information from my exchange server, but when poller.php runs I get the following:

04/07/2006 11:56:22 AM - CACTID: Poller[0] Host[6] DS[236] WARNING: Result from SCRIPT not valid. Partial Result: TotalMessagesAssign...

Anyone have any ideas?
argon0
Cacti User
Posts: 460
Joined: Fri Mar 12, 2004 1:22 pm

Post by argon0 »

1st off, are you running cacti on Windows or Linus, the scripts were written on a Linux machine.

2nd off which version of Cacti are you running - .8.6h or lower.

Finally can you check which version of cactid you are using?

Cheers.

Argon0
No longer a n00by, probably, by now an 0ldby

Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
User avatar
streaker69
Cacti Pro User
Posts: 712
Joined: Mon Mar 27, 2006 10:35 am
Location: Psychic Amish Network Administrator

Post by streaker69 »

argon0 wrote:1st off, are you running cacti on Windows or Linus, the scripts were written on a Linux machine.

2nd off which version of Cacti are you running - .8.6h or lower.

Finally can you check which version of cactid you are using?

Cheers.

Argon0
Actually, I believe I fixed all my problems.

Apparently the text files that were included with the Zip file at the beginning of this thread had some hidden characters in them, mostly likely because they were opened and saved inside Windows. After I edited the Print lines in the two scripts I was having problems with, everything started to work fine.

I did edit the scripts as well, so that you only have edit one line for the path to your check_nt file instead of every single line. Just added a simple variable at the beginning of the scripts. If anyone is interested, I can post my modified scripts, and XML's.

I appreciate the reply.
argon0
Cacti User
Posts: 460
Joined: Fri Mar 12, 2004 1:22 pm

Post by argon0 »

Please do...
No longer a n00by, probably, by now an 0ldby

Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
User avatar
streaker69
Cacti Pro User
Posts: 712
Joined: Mon Mar 27, 2006 10:35 am
Location: Psychic Amish Network Administrator

Post by streaker69 »

argon0 wrote:Please do...
Here ya go. I've included the four scripts that I'm using and an XML export of a Host Template that should include all the graphs and data sources.

I am using the latest NSclient, and I downloaded wmisnmp.exe from MS's webiste to add WMI support to my Win2k server, since that's not native.

I am fairly new to using Cacti, so hopefully I did the xml file correctly. If not, you can use the XML files that were at the start of this thread, since I really didn't make any important changes to them, other than removing two variables from the IMF filter script.
Attachments
Cacti_Exchange2k3.zip
(14.48 KiB) Downloaded 1352 times
sasha
Posts: 3
Joined: Fri Apr 07, 2006 7:25 am

Not working in cacti-0.8.6h

Post by sasha »

Hi,
At frist I used instruction and made some script in perl myself for getting statistics from Exchnage server. Script work when tested from command line but I can't get them to work from Cacti. Then I dropped all of my scripts an used scripts I found on this forum, but again the same problem, Cacti is not graphing values that can be retreived from scripts.

Errors I get in debug mode are:
RRDTool Says:

ERROR: opening '/var/www/localhost/htdocs/cacti/rra/exchange_server_messagessubmitted_314.rrd': No such file or directory


Please can someone help me, am I missining something?

I am running Cacti on gentoo.

Kind Regards,
Sasha
argon0
Cacti User
Posts: 460
Joined: Fri Mar 12, 2004 1:22 pm

Post by argon0 »

Sorry It's taken anyone so long to get back to you!!

Ususally you see that message when the graph is newly created and hasn't had time to create the file yet. How is it now?

If you are still having problems it is likely because the latest release of Cacti requires that you specify the complete path at all times, in the script, in the data source, etc...

Argon0
No longer a n00by, probably, by now an 0ldby

Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
Giorgio
Posts: 21
Joined: Wed Jun 21, 2006 3:28 am

Post by Giorgio »

Hi guys,

To begin i want to thanks argon0 for his help.

I've included an XML export of a Host Template that should include all the graphs and data sources.

The only one Data template that i changed is "Exchange - Mailbox Performance v2". So now you can graph the messages sent, delivered etc.. for the last five minutes.

I changed the data source type to Counter rather than Gauge. So now you take the current PDP (primary data point) you substract it to the PDP 5 minutes before and divise the whole with the steps (300s). To fix it i made a CDEF function that multiply the data value by 300s.

I've not include my scripts because i have a W2K3 in french. So i query the performance counter of windows in french.

Don't forget to modify you script "exchange_emails_scriptv2" to request the total of messages sent, delivered etc.. and not the messages sent, delivered per min.

Giorgio.

"A man who doesn't spend time with his family can never be a real man. "
Attachments
cacti_host_template_ms_exchange_server_2k3.xml
(114.25 KiB) Downloaded 1289 times
argon0
Cacti User
Posts: 460
Joined: Fri Mar 12, 2004 1:22 pm

Post by argon0 »

Nice Georgio - I will be using this within the week!

Thanks

Argon0
No longer a n00by, probably, by now an 0ldby

Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests