• Xof1986

    Good Afternoon,

    Is there a setting somewhere for cool downs on events or the email handler on an event?

    I have a boolean point that when false an event is triggered. If that point starts flapping between true and false I don't want 20 emails to be sent in the next 30 seconds about it.

    I know for high limit events you can set how long it needs to stay at a certain threshold however that is not the functionality I am looking for.

    This would be something like a reset limit except for it being a time count down instead of point value threshhold.

    Thanks!

    posted in User help read more
  • Xof1986

    Phillip,

    I just came across this post regarding the images not defaulting to the override folder in e-mail reports.
    https://forum.infiniteautomation.com/topic/2229/override-logo-doesn-t-replace-logo-on-report-emails

    Could this have been fixed on the version you tested on?

    posted in User help read more
  • Xof1986

    Phillip,

    You're right, that does seem weird.

    I took what you said to mean that as per your example it was pulling "add.png" from your overrides directory.

    If that is what you meant, then that is not the case for me. (Currently on core 3.3.4 and excelReports 3.3.4)

    WARN 2018-04-09T16:56:48,218 (com.serotonin.m2m2.rt.maint.work.EmailWorkItem.execute:92) - Error sending email org.springframework.mail.MailSendException: Failed messages: javax.mail.MessagingException: IOException while sending message; nested exception is: java.io.FileNotFoundException: /opt/mango/web/images/logotest.png (No such file or directory) at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:474) ~[spring-context-support-4.3.13.RELEASE.jar:4.3.13.RELEASE] at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:345) ~[spring-context-support-4.3.13.RELEASE.jar:4.3.13.RELEASE] at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:362) ~[spring-context-support-4.3.13.RELEASE.jar:4.3.13.RELEASE] at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:350) ~[spring-context-support-4.3.13.RELEASE.jar:4.3.13.RELEASE] at com.serotonin.web.mail.EmailSender.send(EmailSender.java:199) ~[mango-3.3.4.jar:?] at com.serotonin.web.mail.EmailSender.send(EmailSender.java:190) ~[mango-3.3.4.jar:?] at com.serotonin.web.mail.EmailSender.send(EmailSender.java:143) ~[mango-3.3.4.jar:?] at com.serotonin.m2m2.rt.maint.work.EmailWorkItem.execute(EmailWorkItem.java:89) [mango-3.3.4.jar:?] at com.serotonin.m2m2.rt.maint.BackgroundProcessingImpl$WorkItemRunnable.run(BackgroundProcessingImpl.java:674) [mango-3.3.4.jar:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_161] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_161] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_161] 
    

    It still wanted to pull directly from "/opt/mango/web/images". I was, however, able to do the following.

    <img src="${inline}<@img logo="false" src="../../overrides/web/images/logotest.png"/>" alt="Logo"/>
    

    Not sure if I interpreted what you wrote incorrectly but nevertheless it is working.

    In addition, I attempted to use an absolute path to avoid any issues if a fix is implemented but was greeted with the following

    Error sending email org.springframework.mail.MailSendException: Failed messages: javax.mail.MessagingException: IOException while sending message; nested exception is: java.io.FileNotFoundException: /opt/mango/web/images/opt/mango/overrides/web/images/logotest.png (No such file or directory) at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:474)
    

    Ed

    posted in User help read more
  • Xof1986

    Good Afternoon,

    I am trying to insert images in to the Excel Report E-Mail but I cannot for the life of me get them in.

    I used the default ftl as a template and only one image is called; the mango logo.

    It is called in this line

    ... <img src="${inline}<@img logo="true"/>" ....>
    

    Those values translate as follows

    ... <img src="cid:/images/logo.png" ....>
    

    Even hardcoding in the above values still brings the proper image but I cannot get any other image brought in to the email. I tried relative and absolute paths and moving images in to different folders but i just can't get it.

    Any help?

    posted in User help read more
  • Xof1986

    Good Afternoon,

    I was trying to upload an edit to a couple of event handlers but was thrown a "java.lang.NullPointerException" error.

    I copied this directly from the output of the export function.

    {
       "eventHandlers":[
          {
             "eventType":{
                "sourceType":"DATA_POINT",
                "dataPointXID":"SiteName_SYS_SITE_SHUTDOWN",
                "detectorXID":"SiteName_SITE_SHUTDOWN"
             },
             "xid":"SiteName_SITE_SHUTDOWN_Email",
             "handlerType":"EMAIL",
             "activeRecipients":[
                {
                   "recipientType":"MAILING_LIST",
                   "mailingList":"Cell_ML"
                }
             ],
             "sendEscalation":false,
             "sendInactive":false,
             "includeSystemInformation":false,
             "includePointValueCount":1,
             "includeLogfile":false,
             "customTemplate":"<#include \"\/text\/include\/siteNameShutdown.ftl\">",
             "additionalContext":[
                {
                   "contextKey":"site",
                   "dataPointXid":"SiteName_SYS_SITE_SHUTDOWN"
                }
             ],
             "alias":"",
             "disabled":false
          }
       ]
    }
    

    I changed "sendInactive":false to "sendInactive":true and cliked import.

    The mango log file shows:

    ERROR 2018-03-20T16:40:41,687 (com.serotonin.m2m2.web.dwr.emport.ImportTask.runImpl:195) - null java.lang.NullPointerException: null at com.serotonin.json.type.JsonObject.getBoolean(JsonObject.java:131) ~[mango-3.2.2.jar:?] at com.serotonin.m2m2.vo.event.EmailEventHandlerVO.jsonRead(EmailEventHandlerVO.java:377) ~[mango-3.2.2.jar:?] at com.serotonin.json.convert.JsonPropertyConverter.jsonRead(JsonPropertyConverter.java:136) ~[mango-3.2.2.jar:?] at com.serotonin.json.JsonReader.readInto(JsonReader.java:290) ~[mango-3.2.2.jar:?] at com.serotonin.json.JsonReader.readInto(JsonReader.java:255) ~[mango-3.2.2.jar:?] at com.serotonin.m2m2.web.dwr.emport.importers.EventHandlerImporter.importImpl(EventHandlerImporter.java:48) ~[mango-3.2.2.jar:?] at com.serotonin.m2m2.web.dwr.emport.Importer.doImport(Importer.java:38) ~[mango-3.2.2.jar:?] at com.serotonin.m2m2.web.dwr.emport.ImportTask.runImpl(ImportTask.java:181) [mango-3.2.2.jar:?] at com.serotonin.m2m2.util.timeout.ProgressiveTask.run(ProgressiveTask.java:61) [mango-3.2.2.jar:?] at com.serotonin.timer.Task.runTask(Task.java:179) [classes/:?] at com.serotonin.timer.TaskWrapper.run(TaskWrapper.java:23) [classes/:?] at com.serotonin.timer.OrderedThreadPoolExecutor$OrderedTaskCollection.run(OrderedThreadPoolExecutor.java:310) [classes/:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_144] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_144] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_144] 
    

    I did use the import function to originally add these event handlers so it is odd to me that it wouldn't accept the update to the handler.

    Am I missing something obvious?

    Thanks!

    posted in User help read more
  • Xof1986

    Good Morning,

    I’m working on a template for monthly e-mail reports but the overrides folder doesn't seem to be functioning properly for this folder.

    I tried 2 different ways.

    I put my own ftl in “/opt/mango/overrides/web/modules/excelReports/web/ftl/myReport.ftl” but the template didn’t show up in the GUI.

    I then put my own in “/opt/mango/web/modules/excelReports/web/ftl/myReport.ftl” and it showed up and works great.

    I don’t want to lose mine on an update though so I went ahead and copied the default "reportEmailBody.ftl" as "myReport.ftl".
    I assumed at this point the "myReport.ftl" in the overrides folder should override the one in the original folder but it still sends out the report as if the overrides folder doesn't exist.

    Should the override folder path be different or a I doing something else wrong?

    Thanks!

    posted in User help read more
  • Xof1986

    Phil,

    I restored all of the incrementals up until the deletion occurred since everything since then would be stored on the ES devices we've deployed so I wasn't worried about the most recent stuff.

    I did not attempt what you suggested since restoring them one at a time worked. After restoring around 10 I would run in to a concurrent error. I would reboot and then pick up were I left off. Everything seems to have gone well and I don't appear to be missing anything.

    Thanks for your help and suggestions.

    posted in User help read more
  • Xof1986

    Running each individually seems to be going well so far. I'll report back how it goes.

    posted in User help read more
  • Xof1986

    I have all data sources disabled while doing the restore also.

    posted in User help read more
  • Xof1986

    Joel,

    When trying to restore the NoSQL db it got through 25/45 of the incrementals and it runs in to this error.

    INFO 2016-09-23 14:15:35,013 (com.infiniteautomation.nosql.maint.MangoNoSqlRestoreWorkItem.execute:84) - Starting Mango NoSQL Restore WorkItem.
    ERROR 2016-09-23 14:49:56,839 (com.infiniteautomation.nosql.maint.MangoNoSqlRestoreWorkItem.execute:101) - Concurrent update java.lang.RuntimeException: Concurrent update at org.tinytsdb.impl.FileLock.lockFile(FileLock.java:197) at org.tinytsdb.impl.FileLock.lock(FileLock.java:79) at org.tinytsdb.impl.Janitor.lock(Janitor.java:66) at org.tinytsdb.impl.TinyTSDBImpl.(TinyTSDBImpl.java:128) at org.tinytsdb.TinyTSDBFactory.createDatabase(TinyTSDBFactory.java:34) at com.infiniteautomation.nosql.maint.MangoNoSqlRestoreWorkItem.restore(MangoNoSqlRestoreWorkItem.java:192) at com.infiniteautomation.nosql.maint.MangoNoSqlRestoreWorkItem.execute(MangoNoSqlRestoreWorkItem.java:97) at com.serotonin.m2m2.rt.maint.BackgroundProcessing$1.run(BackgroundProcessing.java:54) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)

    posted in User help read more