Configure Netxms to use Gmail
Hi all,
I have the following servers:
1- Server A , 172.16.16.82 ( here , i installed postfix and Netxms server )
2- Server B,172.16.16.86 ( here ,i installed the Netxms agent )
currently I would like to send an e-mail alerts from my gmail account to a list of recipients. So , I did the following :
1- I installed mail relay (postfix) on Server A.
2- I configure DCI on Server B ( i monitored the CPU,RAM,DiskSpace)
3- I follow the below link in order to create the policy, etc :
https://wiki.netxms.org/wiki/How_to_send_e-mail_notification_when_disk_space_is_low
4- I send a test e-mail from Server A using Postfix ( just to make sure that my postfix is able to connect to gmail)
Unfortunately , till now I could not make the Netxms to send alerts using Postfix ( i mean to send e-mail alerts). Is there any way to make this work I am really suffering :'(
attachments are :
Netxms_Server_Conf ( this SMTP config)
Netxms_Action( this action I made to send mails)
your support is highly appreciated as i am stuck in the project :(
Regards
Verify that you can send mail using local postfix.
Connect using telnet or netcat:
telnet 127.0.0.1 25
nc 127.0.0.1 25
Sample session (my input in bold, change email address accordingly):
alk@mail:~$ nc 127.0.0.1 25
220 mail.netxms.org ESMTP Postfix
ehlo netxms250-mail.netxms.org
250-PIPELINING
250-SIZE 134217728
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from: [email protected]250 2.1.0 Ok
rcpt to: [email protected]250 2.1.5 Ok
data354 End data with <CR><LF>.<CR><LF>
From: [email protected]
To: [email protected]
Subject: test mail
test body
.250 2.0.0 Ok: queued as 7F9202019B
quit221 2.0.0 Bye
Yes it works when I tried your command and I received the e-mail ,, but how to implement this in netxms itself :'(
You tried "mail" (or mailx, or sendmail) command - or SMTP?
If you are sure that SMTP is working - increase debug to 6 and look for entries with tag "SMTP"
I used the same command that you provided
-------------------
telnet 127.0.0.1 25
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
220 Communication-madar2.localdomain ESMTP Postfix
ehlo netxms
250-Communication-madar2.localdomain
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from:
[email protected]250 2.1.0 Ok
rcpt to:
[email protected]250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
From:
[email protected]To:
[email protected]Subject: hello
hi all
.
250 2.0.0 Ok: queued as 72319C06BAEC
quit
221 2.0.0 Bye
-----------------------------------------
Hi ,
I got below error in the log :
------------------------
[16-Aug-2016 13:47:09.532] [DEBUG] [CLSN-0] Message dump:
** 001B0000000001E80000001800000006
** 00000018000000000000001600000000
** 00000014010000000000002000530059
** 0053005F0053004D00540050005F0046
** 00410049004C00550052004500000000
** 00000019000000000000000100000000
** 0000000D000000000000000100000000
** 0000001A01000000000000420055006E
** 00610062006C006500200074006F0020
** 00730065006E006400200065002D006D
** 00610069006C00200074006F0020003C
** 00250033003E003A0020002500320000
** 0000001B010000000000011A00470065
** 006E0065007200610074006500640020
** 007700680065006E0020007300650072
** 00760065007200200069007300200075
** 006E00610062006C006500200074006F
** 002000730065006E006400200065002D
** 006D00610069006C002E000D000A0050
** 006100720061006D0065007400650072
** 0073003A000D000A0020002000200031
** 00290020004500720072006F00720020
** 0063006F00640065000D000A00200020
** 0020003200290020004500720072006F
** 007200200074006500780074000D000A
** 00200020002000330029002000520065
** 00630069007000690065006E00740020
** 0061006400640072006500730073000D
** 000A002000200020003400290020004D
** 00610069006C0020007300750062006A
** 0065006300740000
** code=0x001B (CMD_EVENT_DB_RECORD) flags=0x0000 id=24 size=488 numFields=6
** [ 24] INT32 22
** [ 20] STRING "SYS_SMTP_FAILURE"
** [ 25] INT32 1
** [ 13] INT32 1
** [ 26] STRING "Unable to send e-mail to <%3>: %2"
** [ 27] STRING "Generated when server is unable to send e-mail.
Parameters:
1) Error code
2) Error text
3) Recipient address
4) Mail subject"
---------------------
your support is highly appreciated
Regards
Hi,
this is not an error, just message dump with system event configuration being transmitted to client. If you have SMTP issues, you should look for lines with word SMTP.
Best regards,
Victor
Hi Victor,
I attached four images :
1- Specific DC configuration
2- Event that I create for physical Mem
3- event policy for that event
4- Action that will be triggered.
5- Finally Server SMTP Configuration.
kindly have a look at them and give me your feedback
Regards
Hi,
configuration seems correct. Please filter server log by "SMTP:" messages and post them here. On debug level 8 server should log entire SMTP conversation.
Best regards,
Victor
Hi Vector,
finally it works , but i have one issue. the alarm is generated only one time. For example:
if the first polled value is exceeding the threshold ---> generate alarm then email
after that whatever next polled value it does not generate another alarm
can you please advise ?
Regards
any update please
Regards