Saturday, 26 March 2016

Nagrestconf on Synology DSM 6

Synagios version 0.14.2 released for x86 and arm. Notable changes:
  • Fixes for DSM 6
  • Updated to Nagrestconf 1.174.5.

19 comments:

  1. SOrry, I forget:

    root@nas02:/# uname -a
    Linux nas02 3.10.77 #7321 SMP Wed Mar 23 11:47:12 CST 2016 x86_64 GNU/Linux

    One of my friends use DSM for arm, there it's working.

    ReplyDelete
  2. Hi Mark,

    after upgrade to DSM6 and Synagios 0.14.2 the program "/usr/bin/mailsender" don't work:

    root@nas02:/# chroot /volume1/@appstore/Synagios/nagios-chroot/
    ash: warning: setlocale: LC_ALL: cannot change locale (en_US.utf8)
    root@nas02:/# /usr/local/bin/mailsender 127.0.0.1 -
    ash: /usr/local/bin/mailsender: No such file or directory
    root@nas02:/# ls -la /usr/local/bin/mailsender
    -rwxr-xr-x 1 root root 7620 Mar 26 15:28 /usr/local/bin/mailsender
    root@nas02:/# uname -a
    Linux nas02 3.10.77 #7321 SMP Wed Mar 23 11:47:12 CST 2016 x86_64 GNU/Linux

    The binary really exists, but it's not possible to execute via nagios notification or manually.

    I changed the mailsender-binary to the binary from 0.14.1, but it seems to be the same.

    One of my friends is using the ARM-version, there it works.

    Do you have any idea?

    Regard, Thomas R.

    ReplyDelete
  3. Many thanks for the report Thomas.

    You are correct - it's broken in DSM6! I've uploaded a new mailsender binary to sourceforge (https://sourceforge.net/projects/nagrestconf/files/Synology/x86/) in the mailsender folder.

    ReplyDelete
    Replies
    1. Hi Mark,

      thats it. It*s working well now.

      Thanks for your fast support.

      Regards, Thomas

      Delete
  4. Hi Mark,

    I have the same problem as Thomas was. I've checked the corrected mailsender binary but there is no mailsender folder.
    Can you help me, pls?
    Thanks,
    Gabor

    ReplyDelete
  5. Hi Gabor! Please install the latest synagios release. The fixed binary is in the latest synagios release. To check, log into your diskstation as 'root' user then:

    chroot /volume1/@appstore/Synagios/nagios-chroot/ /bin/bash

    Then type

    mailsender

    which should produce the output:

    mailsender

    See this post:

    https://groups.google.com/forum/#!searchin/nagrestconf-users/mail|sort:relevance/nagrestconf-users/KTg584IfhT8/n2qGH41SodMJ

    And maybe post further questions in the google group nagrestconf-users :)

    Thanks! Mark.

    ReplyDelete
    Replies
    1. Hi Mark,

      I've installed the nagrestconf just 1 week before, V0.14.5. My result is:

      admin@Synology:~$ sudo chroot /volume1/@appstore/Synagios/nagios-chroot/ /bin/bash
      Password:
      bash: warning: setlocale: LC_ALL: cannot change locale (en_US.utf8)
      root@Synology:/# mailsender
      bash: /usr/local/bin/mailsender: No such file or directory
      root@Synology:/# ls -al /usr/local/bin
      total 16
      drwxrwsr-x 2 root root 4096 Jan 24 17:47 .
      drwxrwsr-x 11 root root 4096 Mar 26 2016 ..
      -rwxr-xr-x 1 root root 7620 Mar 26 2016 mailsender
      root@Synology:/# uname -a
      Linux Synology 3.10.77 #8451 SMP Wed Jan 4 00:31:31 CST 2017 x86_64 GNU/Linux

      Delete
    2. For now, on the diskstation:

      sudo chroot /volume1/@appstore/Synagios/nagios-chroot/ /bin/bash

      cd

      wget -O mailsender.c https://gist.github.com/mclarkson/200a3ce77a308f294947de0ee290c1f8/raw/

      gcc -static -o /usr/local/bin/mailsender mailsender.c

      Then test it.

      Delete
    3. wget successfully done, and

      root@Synology:~# gcc -static -o /usr/local/bin/mailsender mailsender.c
      bash: gcc: command not found

      :(

      Delete
    4. may I reinstall the whole package?

      Delete
    5. apt-get update
      apt-get install build-essential

      Sorry, I must have done that on mine before.

      Delete
    6. You can reinstall the package - That's fine. I will do the same thing later today and check the binary.

      Delete
    7. after apt-gets and gcc - it's better:
      root@Synology:/etc/nagios3# /usr/local/bin/mailsender
      mailsender

      thanks!

      Delete
    8. .... and after setting up the NAS's smtp relay service the notification is working well!

      Thank Mark, again!

      Gabor

      Delete
    9. Great! Many thanks for reporting back Gabor.

      Delete
  6. This comment has been removed by the author.

    ReplyDelete
  7. Hmm. Wish I could edit these comments. The output from mailsender should be:

    mailsender <host | ipaddr> <file name>

    but it needs to be written with html escapes in these comments!

    ReplyDelete
  8. root@DiskStation:/# uname -a
    Linux DiskStation 3.10.77 #8451 SMP Wed Aug 17 05:12:45 CST 2016 x86_64 GNU/Linux

    root@DiskStation:/# sha1sum /usr/local/bin/mailsender
    6f07b7450bc58031acb739d9a4e2689909b1fd9f /usr/local/bin/mailsender

    Same sha1sum for you?

    ReplyDelete
  9. No:

    root@Synology:/# uname -a
    Linux Synology 3.10.77 #8451 SMP Wed Jan 4 00:31:31 CST 2017 x86_64 GNU/Linux
    root@Synology:/# sha1sum /usr/local/bin/mailsender
    d4e3bd2cea81421d9c32e51ef4a6d523ba330684 /usr/local/bin/mailsender
    root@Synology:/#

    ReplyDelete