Active IQ Unified Manager Discussions
Active IQ Unified Manager Discussions
I am trying to customize the mails which come from the ocum alerts.
I saw that there is no built in functionallity in the product but it is possible to do this by script.
The OCUM is a virtual aplliance, does that mean it does not support powershell scripts?
I tried a simple test to upload a script like that:
Send-MailMessage -From DFM@localdomain.com -To Tomer.Schweid@localdomain.com -Subject "Test" -Body "This is a test message" -SmtpServer mailhost.localdomain.com
(domain name was replaced).
When running manually it sends the email so the command is fine.
The OCUM also sends it's own built in mails so it's not that nothing happend, I get the default mails and don't get the test one.
If someone could please tell me what is the problem it would be greatfull. Also, if you could provide a shell script that does the same it would be great.
My next step afterwards is to get environment variables so the mails would make sense so if you guys know this it would also save me some time.
Thanks in advance,
Tomer
Hi Tomer,
To help troubleshoot the problem, could you please attach the logs from the date time the alarm\event is generated.
To enable verbose logging please perform the following steps.
C:\Program Files\NetApp\essentials\jboss\server\onaro\conf\logback-server.xml <!-- NetApp Packages --> <logger name="com.netapp" level="INFO"/> <logger name="com.netapp.dfm" level="DEBUG"/> <logger name="com.netapp.nwf" level="WARN"/> <logger name="com.netapp.autozapi.server" level="DEBUG"/> <logger name="com.netapp.um.script.service" level="DEBUG"/>
Note: for the RHEL or vApp version the log will be "/var/log/ocum/ocum-script.log"
Please check the log for any errors and post the results. Hope that helps
/Matt
First of all, thank you Matt.
I will need to check if it is possible to make this change.
Anyways, when I SSH to the server I do not have a normal shell so I don't think I could access the log or even make the change itself.
All I get is:
Main Menu: -------------------------- 1 ) Upgrade (Disabled. Must be run on virtual machine console.) 2 ) Network Configuration 3 ) System Configuration 4 ) Support/Diagnostics x ) Exit Enter your choice:
Hi Tomer,
Here is the KB to access the OCUM vAPP in the diag shell.
Hope that helps
/Matt
Hi Tomer,
Here are some instructions for you for enabling debug logging for the script service for the OCUM vSphere vApp version.
diag@TESTOC71P1:/$ sudo service ocie status [ ok ] ocie is running. diag@TESTOC71P1:/$ sudo service ocie stop [ ok ] Stopping NetApp OnCommand Insight Essentials Server service: ocie. [info] Waiting for ocie to shut down. .......
diag@TESTOC71P1:/$ cd /opt/netapp/essentials/jboss/server/onaro/conf/ diag@TESTOC71P1:/opt/netapp/essentials/jboss/server/onaro/conf$ sudo vi logback-server.xml
<!-- NetApp Packages --> <logger name="com.netapp" level="INFO"/> <logger name="com.netapp.dfm" level="DEBUG"/> <logger name="com.netapp.nwf" level="WARN"/> <logger name="com.netapp.autozapi.server" level="DEBUG"/> <logger name="com.netapp.um.script.service" level="DEBUG"/>
diag@TESTOC71P1:/opt/netapp/essentials/jboss/server/onaro/conf$ cat logback-server.xml | grep "um.script.service" <logger name="com.netapp.um.script.service" level="DEBUG"/>
diag@TESTOC71P1:/var/log/ocum$ sudo service ocie start [ ok ] Starting NetApp OnCommand Insight Essentials Server service: ocie.
diag@TESTOC71P1:/var/log/ocum$ sudo service ocie status [ ok ] ocie is running.
diag@TESTOC71P1:/$ cd /var/log/ocum
diag@TESTOC71P1:/var/log/ocum$ cat ocum-script.log
When you check the log file it will display:
Hope that helps
/Matt
Thanks a lot!
I have another projects to do so I won't be able to clear time for this in the near future.
I will look into it when I can and update.
Thanks again,
Tomer
Hi Tomer,
The OCUM vApp is based on Debian and supports shell or Perl scripts (not powershell) so you'd have to use sendmail. EG:
https://www.tutorialspoint.com/perl/perl_sending_email.htm
Also added some additional info here on troubleshooting:
/Matt