Showing posts with label lotus notes. Show all posts
Showing posts with label lotus notes. Show all posts

Domino Server Data Collector [DISCONTINUED]


NOTE: This project has been discontinued and there are no longer any plans to update this.

Similar to my Exchange Server Data Collector, this one is designed for Domino Server instead.

I made this with .NET, with Lotus Notes COM component.
If you'd ask why didn't I just make this in LotusScript as an agent, well here are my answers.

  • I hate LotusScript
  • I hate Domino
  • I hate Lotus Notes
  • If Domino is acting up, the Agent may not work
  • If Domino is acting up, the email report or error notification may not be sent.

Those are why I created this independent from any Domino components (or DDM).



What does this do?


This utility collects the following information:


  • Queue information like Pending, Hold, Dead mail status in each of routing mailboxes.
  • Disk space information of the server.
  • Number of mailbox with statistics for Over quota, Warning and Normal. 





 

There are two programs in this project:

  • Dominator.exe - The main executable that collects information from the domino server.
  • SecureStrings.exe - Tool to encrypt the Notes.ID password that will be in the configuration file of the main executable.


How does this work?



  • Read contents of "config.ini"
  • Connect to the specified server
  • Login to Domino Server using the ID specified in Notes.INI
  • Extract Queue information
  • Extract Disk space information
  • Extract Mailbox information
  • Generate report
  • Send HTML report via email if enabled


What do I need to use this?


  • A computer with Lotus Notes installed and configured with the user ID that have proper access to the Domino Server.
  • .NET Framework 2.0 installed
  • The program: http://sdrv.ms/Y3w9SI
  • You know how to use the Command Prompt

How do I use this?


  • Configure your Lotus Notes client PC. This utility will use the "last used" Notes.ID in the notes.ini file to connect to the Domino Server.
  • Download the program package here and save/extract to whichever folder you choose. http://sdrv.ms/Y3w9SI
  • Modify the CONFIG.INI to input the correct values.
  • Run the SecureStrings.exe program to encrypt the Notes.ID password that you will put in the CONFIG.INI
 

  • Run DOMINATOR.exe


What's in the CONFIG.INI?

===========================================
[OPTIONS]
;This is the DOMINO server
DSvrName=DOM01/LabWorks

;This is the HOSTNAME

WSvrName=DOM01

;Indicate here the number of routing mailboxes
NumMailBox=1

;Here you put the encrypted password for the NOTES.ID (use the securestrings.exe tool to encryt)
NotesPassword=FZ+/8l+pS2n2bX3eszbrgA==


[SMTP]
;Specify only ONE SMTP server IP and PORT
SMTPServerIP=127.0.0.1
SMTPServerPort=25

;Populate this item if the SMTP server requires authentication, usually this is not the case.
;Accepted values are only TRUE or FALSE

AuthRequired=False

;If AuthRequired=True, you need to fill in this information for the login credentials.
;The format is DOMAIN;UserName;Password

Creds=

[REPORT]

;The company name to appear in the report
CompanyName=LabWorks

;Sender="Display Name"
Sender="DOM01 Mailer"

;When specifying multiple recipient, seperate with commad eg: someone@hp.com,nobody@hp.com
Recipients=

;This is the Title that will be shown in the HTML report and also the Subject of the email report.
;The program will automatically append the DATE and TIME in this string
ReportTitle=DOM01 Status Report as of

;This item indicates if the program will send the report via email
;EmailReport= True or False

EmailReport=False

;This can be any value. This is needed so that the email report will be less likely to be considered as spam.
XMailer=Dominator by june.castillote@gmail.com

;This will be the prefix of the HTML output file. The date and time will automatically be appended.
ReportFile=LabWorks_

;The value which will be considered normal for the mail queue, anything above the value specified here will be shown as critical.
QueueThreshold=100

;The value which will be considered normal for the disk space free percentage, anything above the value specified here will be shown as critical.
DiskThreshold=15 


Download Link

Dominator 1.0





Share:

Export List of User Mailbox with Size information in Lotus Domino

One would think that there is a function in Domino Admin client to export a list of database with their corresponding size information. Well, as simple as the concept might be, there is no built in tool to do just that. If the mailbox quota/size statistics is crucial for your organization for capacity planning or just for record purposes, you can always leverage the LotusScript to export these information.

Note that in this example, it is expected that you are already familiar with using Lotus Notes Designer and LotusScript.

Create the Appplication
1. Create a blank application and place it in your "data" folder.
2. Create a Form and add a Button.







3. Add your code to the Button's click event.

================================
 Sub Click(Source As Button)
    On Error Resume Next
  
    Dim oQuota As Integer
    Dim oWarning As Integer
    Dim oTotal As Integer
    Dim oTotalSize As Double
  
    Dim db As NotesDatabase
    Dim f As Integer
    f = Freefile
    Open "c:\DBlist.txt" For Output As #f
  
    Dim dbdir As New NotesDbDirectory("RSBDOM01/RSBPH")
    Set db = dbdir.GetFirstDatabase(DATABASE)
    Print #f, "Title" & Chr$(9) & "FileName" & Chr$(9) & "Size" & Chr$(9) & "Quota" & Chr$(9) & "Warning"
    While Not(db Is Nothing)
        If Instr(1,db.FilePath,"mail\",5)>0 Then
            Print "Getting Info: " & db.Title
            Print #f, db.Title & Chr$(9) & db.FileName & Chr$(9) & db.Size & Chr$(9) & db.SizeQuota & Chr$(9) & db.SizeWarning
          
            oTotal=oTotal+1
            oTotalSize=oTotalSize+db.size
          
            If db.size/1024 > db.SizeQuota  Then
                oQuota=oQuota+1              
            Elseif db.Size/1024 > db.SizeWarning Then
                oWarning=oWarning+1              
            End If  
        End If  
        Set db = dbdir.GetNextDatabase      
    Wend
    Print "Export Complete"
    Messagebox("Overquota: " & oQuota & Chr$(13) & Chr$(10) & "Warning: " & oWarning & Chr$(13) & Chr$(10) & "Normal: " & oTotal-oQuota-oWarning & Chr$(13) & Chr$(10) &  "Total Mail Files: " & oTotal  & Chr$(13) & Chr$(10) & "Total Size: " & Format(oTotalSize/1024,"Standard") & " KB")
    Close #f
End Sub


================================
4. Create a Frameset and add the Form to one of the Frames.
5. Set the Frameset to show once the Database is opened.
6. Save the Application and name it whatever you want.

Output

It shows the summary in a Message Box:
 

And it saves a text file of the raw data in tabular form which you can use for data manipulation in Excel


Just a simple demonstration of reading database properties using LotusScript
Share:

Popular Posts

Powered by Blogger.