Monitoring Exchange 2003 from Linux Cacti

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

Moderators: Moderators, Developers

Post Reply
Author
Message
czimmerman
Posts: 1
Joined: Mon Jul 31, 2006 9:51 am

Connection Refused

#61 Post by czimmerman » Mon Jul 31, 2006 9:54 am

When I manually run these scripts from my linux machine, I am getting "connection refused" message when trying to pull stats.

I also get this error:
RRDTool Says:

ERROR: opening '/var/www/html/cacti/rra/texchng_blocklist_qry_28.rrd': No such file or directory
I'm assuming that the RRD tool get the error because it's not pulling any stats. Any ideas?

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

#62 Post by argon0 » Tue Aug 01, 2006 3:20 pm

have you installed nsclient on the Server?

Without that installed the scripts will have nothing to connect to....

Either that or there's some sort of Firewall in the way...

Argon0
[size=50]No longer a n00by but[/size] not yet an 0ldby

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

User avatar
cpt_ahab
Cacti User
Posts: 60
Joined: Tue Feb 01, 2005 11:34 am

...

#63 Post by cpt_ahab » Thu Aug 17, 2006 9:28 am

Hello cactiusers

I migrated our cacti install from win32 to linux.
All works great, but i cant get those wmi scripts working.

Did you compiled the check_nt binary by yourself...?
which version did you use on the linux side..?
also the 1.07.1 ...?

I can run the scripts on the cli but i only get 0s back as a result....
i only need exchange delivery stats and IS stats.
Righnow i use

exchange_users_script.pl
exchange_emails_scriptv2.pl
and the xml that came with the zip.
from arg0ns zip.

any ideas..?
cacti 0.8.6j ** cactid 0.8.6d ** rrdtool 1.2.15
Debain ** Apache 2 ** PHP 4.3.0

Superman
Posts: 1
Joined: Thu Sep 28, 2006 1:54 am

#64 Post by Superman » Thu Sep 28, 2006 1:56 am

Whats the difference between Users and Active Users?

Thanks

User avatar
cpt_ahab
Cacti User
Posts: 60
Joined: Tue Feb 01, 2005 11:34 am

#65 Post by cpt_ahab » Thu Sep 28, 2006 6:41 am

Superman wrote:Whats the difference between Users and Active Users?

Thanks
i wanted to know also

here is the answer

MSExchangeIS\Active User Count

The "MSExchangeIS\Active User Count" counter is generally a good counter to track, but it also has a few gotchas. This counter gives the number of unique users that have logged on to the server and been active in the last 10 minutes. Generally, "MSExchangeIS\Active User Count" is less than "MSExchangeIS\User Count". However, under some conditions, "MSExchangeIS\Active User Count" can exceed "MSExchangeIS\User Count" (see the first item in the list below). Additionally, the counter value can exceed the number of mailboxes on the server. This can happen for two reasons:

- If client applications disconnect (close all their logons) and reconnect (open at least one new logon) multiple times in one session, then they will be counted multiple times in the "MSExchangeIS\Active User count".

- Users that are connected to the server may not have a mailbox on that server.

- If the server is a public folder server, it will includes the users that are logged on to public folders. These can be users from other servers.

- The counter includes users from other servers who are logged on to other user's mailboxes (such as in the case of checking calendar details, if the users have shared their calendars).

MSExchangeIS\User Count

"MSExchangeIS\User Count" is the number of users connected to the information store. This can be higher than the number of mailboxes on the server because:

- If the server is a public folder server, it will includes the users that are logged on to public folders. These can be users from other servers.

- The count includes users who are logged on to other user's mailboxes (such as in the case of checking calendar details, if the users have shared their calendars).


i took it from there also other good infos for counters

http://msexchangeteam.com/archive/2006/ ... 28871.aspx[/b]
cacti 0.8.6j ** cactid 0.8.6d ** rrdtool 1.2.15
Debain ** Apache 2 ** PHP 4.3.0

User avatar
adrianmarsh
Cacti User
Posts: 435
Joined: Wed Aug 17, 2005 8:51 am
Location: UK

#66 Post by adrianmarsh » Mon Oct 02, 2006 4:21 pm

Was this for IMF v1 or v2 ?

My IMF results are coming back as 0 on everything, but performance monitor on my SBS2003 system shows counters for each SCL

User avatar
adrianmarsh
Cacti User
Posts: 435
Joined: Wed Aug 17, 2005 8:51 am
Location: UK

#67 Post by adrianmarsh » Mon Oct 02, 2006 5:53 pm

Well.. I figured out that the scripts are using the correct WMI names (from Perf. Monitor), but I don't know why I get 0 returned.

I had NSclient 1.07, and then i tried v2, and also I've now tried NC_NET, but I still get 0... The other values come out ok, but IMF is all 0.

kevandju
Posts: 44
Joined: Tue Oct 10, 2006 3:30 pm

Problems with these scripts

#68 Post by kevandju » Fri Oct 20, 2006 3:08 pm

I am running CactiEZ 0.2b on a Linux box and polling a Windows 2003 server with WMI+SNMP support up and working and the NSClient 1.07.1 installed. I have also copied check_nt into my scripts directory and given appropiate permissions to it. I can SSH onto my Linux box and run the check_nt command pull UPTIME, Processor info, etc... fine.

I am currently using the most up to date scripts posted in this thread all copied into the scripts dir and given 755 and apache permissions. I have loaded the Exchange 2K3 Host template and created all the graphs and have waited for 3 hours and I'm pulling no data. Can someone please advise me on what to try or check for? Here are my error listed in the log:

Code: Select all

10/20/2006 04:46:20 PM - CACTID: Poller[0] Host[24] DS[90] WARNING: Result from SCRIPT not valid. Partial Result: ...  
10/20/2006 04:46:20 PM - CACTID: Poller[0] Host[24] ERROR: Empty result [server03.stellar.local]: '/usr/bin/perl /opt/apache/htdocs/cacti/scripts/exchange_imf_script.pl '  
10/20/2006 04:46:20 PM - CACTID: Poller[0] Host[24] DS[93] WARNING: Result from SCRIPT not valid. Partial Result: ...  
10/20/2006 04:46:20 PM - CACTID: Poller[0] Host[24] ERROR: Empty result [server03.stellar.local]: '/usr/bin/perl /opt/apache/htdocs/cacti/scripts/exchange_filters_script.pl '  
10/20/2006 04:46:20 PM - CACTID: Poller[0] Host[24] DS[89] WARNING: Result from SCRIPT not valid. Partial Result: ...  
10/20/2006 04:46:20 PM - CACTID: Poller[0] Host[24] ERROR: Empty result [server03.stellar.local]: '/usr/bin/perl /opt/apache/htdocs/cacti/scripts/exchange_filters_script.pl '  
10/20/2006 04:46:20 PM - CACTID: Poller[0] Host[24] DS[92] WARNING: Result from SCRIPT not valid. Partial Result: ...  
10/20/2006 04:46:20 PM - CACTID: Poller[0] Host[24] ERROR: Empty result [server03.stellar.local]: '/usr/bin/perl /opt/apache/htdocs/cacti/scripts/exchange_emails_scriptv2.pl server03.stellar.local' 

Thanks for the help in this!!
Last edited by kevandju on Fri Oct 20, 2006 3:51 pm, edited 2 times in total.

User avatar
icetoad
Cacti User
Posts: 65
Joined: Wed Oct 18, 2006 6:20 pm
Location: Orlando
Contact:

#69 Post by icetoad » Fri Oct 20, 2006 3:36 pm

I have been playing this this.. i get good information on the old check_nt but the new version of check_nt (which has the ability to poll wmi) gives me errors in the cacti log but if i run the script manually, it works fine, though the output is different.


Old check_nt output:

Code: Select all

UserCount:13 ActiveUserCount:8 ActiveConn:102 
New check_nt output:

Code: Select all

UserCount:\MSExchangeIS\User Count = 14.00 ActiveUserCount:\MSExchangeIS\Active User Count = 12.00 ActiveConn:\MSExchangeIS\Connection Count = 103.00
These are the errors i get in the log:

Code: Select all


10/20/2006 04:20:07 PM - CMDPHP: Poller[0] Host[3] DS[44] WARNING: Result from CMD not valid.  Partial Result: MessagesSubmittedPer
10/20/2006 04:20:11 PM - CMDPHP: Poller[0] Host[3] DS[43] WARNING: Result from CMD not valid.  Partial Result: TotalMessagesAssigne
10/20/2006 04:20:15 PM - CMDPHP: Poller[0] Host[3] DS[40] WARNING: Result from CMD not valid.  Partial Result: UserCount:\MSExchang
10/20/2006 04:20:18 PM - CMDPHP: Poller[0] Host[3] DS[41] WARNING: Result from CMD not valid.  Partial Result: MessagesSubmittedPer
10/20/2006 04:20:22 PM - CMDPHP: Poller[0] Host[3] DS[42] WARNING: Result from CMD not valid.  Partial Result: BlockListDNSQueriesI
I think the files need an adjustment in my case and i am going to play with the perl but i dont know alot of perl.. so this should be interesting.

Any help would be appreciated!

User avatar
streaker69
Cacti Pro User
Posts: 711
Joined: Mon Mar 27, 2006 10:35 am
Location: Psychic Amish Network Administrator

#70 Post by streaker69 » Fri Oct 20, 2006 8:41 pm

Please try the script files from this post:

http://forums.cacti.net/viewtopic.php?p=62877#62877

I had some issues with the original ones from this thread and worked on these. Let me know if they solve your problems.

kevandju
Posts: 44
Joined: Tue Oct 10, 2006 3:30 pm

#71 Post by kevandju » Sun Oct 22, 2006 7:04 pm

Streaker I am using your scripts and still getting no data. I discovered since my last post that I had to edit the scripts to correct the check_nt path and then the path to where the script directory was located and after that I still have no data. This is what I receive in the cacti log.

Code: Select all

10/22/2006 08:01:05 PM - CACTID: Poller[0] Host[24] DS[88] WARNING: Result from SCRIPT not valid. Partial Result: ...  
10/22/2006 08:01:05 PM - CACTID: Poller[0] Host[24] DS[91] WARNING: Result from SCRIPT not valid. Partial Result: ...  
10/22/2006 08:01:05 PM - CACTID: Poller[0] Host[24] DS[87] WARNING: Result from SCRIPT not valid. Partial Result: ...  
10/22/2006 08:01:05 PM - CACTID: Poller[0] Host[24] DS[94] WARNING: Result from SCRIPT not valid. Partial Result: TotalMessagesAssigne...  
10/22/2006 08:01:05 PM - CACTID: Poller[0] Host[24] DS[90] WARNING: Result from SCRIPT not valid. Partial Result: TotalMessagesAssigne...  
10/22/2006 08:01:05 PM - CACTID: Poller[0] Host[24] DS[93] WARNING: Result from SCRIPT not valid. Partial Result: ...  
10/22/2006 08:01:05 PM - CACTID: Poller[0] Host[24] DS[89] WARNING: Result from SCRIPT not valid. Partial Result: ...  
When I run any of the scripts from SSH they work, here is example

Code: Select all

[[email protected] ~]# /usr/bin/perl /var/www/html/scripts/exchange_users_script.pl server03.stellar.local get ActiveUserCount,UserCount
UserCount:11 ActiveUserCount:8 ActiveConn:100

User avatar
streaker69
Cacti Pro User
Posts: 711
Joined: Mon Mar 27, 2006 10:35 am
Location: Psychic Amish Network Administrator

#72 Post by streaker69 » Sun Oct 22, 2006 8:24 pm

It's possible that I've changed my script since I posted that. When I get to work tomorrow I'll post exactly what I'm using now and see if that fixes it for ya.

michael.williams
Posts: 30
Joined: Tue Oct 24, 2006 11:02 am
Contact:

#73 Post by michael.williams » Tue Oct 24, 2006 12:17 pm

looks like i'm dealing with the same problem everyone else is having...
However, I am unable to import the v2 script. It says unable to parse. I get the following error even when I try to open it in IE7...

<gprint_id>hash_06001119414480d6897c8731c7dc6c5310653e</gprint_id>
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.

Is there any way the file got corrupted? would anyone mind reuploading that Exchange Delivery Statistics V2 file? By the way, is all that you to do to "install" ns client is place it in the linux directory of your other scripts?

michael.williams
Posts: 30
Joined: Tue Oct 24, 2006 11:02 am
Contact:

#74 Post by michael.williams » Tue Oct 24, 2006 12:20 pm

actually, i just uploaded streaker's v2a, and it parsed. Now, just waiting to see if my graph populates...

User avatar
streaker69
Cacti Pro User
Posts: 711
Joined: Mon Mar 27, 2006 10:35 am
Location: Psychic Amish Network Administrator

#75 Post by streaker69 » Mon Oct 30, 2006 1:32 pm

michael.williams wrote:actually, i just uploaded streaker's v2a, and it parsed. Now, just waiting to see if my graph populates...
Ok, here's the steps that I had to take to get these scripts to work on the new CactiEZ 0.2 ISO. These were previously working on my FreeBSD installation, but I moved to the ISO because I was running FreeBSD in a VmWare session and I didn't like the loss in performance from the Host OS.

Copy the files to /var/www/html/scripts

change the path statement in each script to point to where check_nt is installed: /usr/lib/nagios/plugins

chown&chmod your script files

Code: Select all

chown -R apache:apache *.pl
chmod +755 *.pl
Imported the XML File.

Hopefully this helps.

Edit: I've uploaded a newer version of the XML file. I've corrected an error that I had in the original that did not have the correct path value for the /scripts directory. This one should be a little more dynamic for various installations.
Attachments
cacti_host_template_ms_exchange_server_2k3.xml
(112.79 KiB) Downloaded 828 times

Post Reply