• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

NUT server and UPS general question

General pfSense Questions
6
71
12.8k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N
    netboy @dennypage
    last edited by netboy Nov 14, 2022, 8:11 PM Nov 14, 2022, 7:50 PM

    @dennypage
    Sure here we go...

    Masked password as xxxx, yyyy and zzzz - BTW there are no spaces in my password:

    netgate - upsd.users

    [admin]
    password = xxxxx
    actions = set
    actions = fsd
    instcmds = ALL

    [monmaster]
    password = yyyyy
    upsmon master

    [monslave]
    password = zzzzz
    upsmon slave

    pi- upsd.users

    [admin]
    password = nnnnnn
    actions = set
    actions = fsd
    instcmds = ALL

    [monmaster]
    password = uuuuuuu
    upsmon master

    [monslave]
    password = xxxxx
    upsmon slave

    netgate - upsmon.conf
    blanks no entries

    pi - upsmon.conf
    MONITOR netgateUPS@192.168.0.1 0 monslave zzzzz slave

    Am I missing MONITOR entries in upsmon.conf in netgate?

    D 1 Reply Last reply Nov 14, 2022, 8:11 PM Reply Quote 0
    • D
      dennypage @netboy
      last edited by Nov 14, 2022, 8:11 PM

      @netboy said in NUT server and UPS general question:

      netgate - upsmon.conf
      blanks no entries

      Based upon your prior screenshots, upsmon.conf on the pfSense system cannot be empty.

      Also, please post ups.conf from both systems.

      N 1 Reply Last reply Nov 14, 2022, 8:16 PM Reply Quote 0
      • N
        netboy @dennypage
        last edited by Nov 14, 2022, 8:16 PM

        @dennypage
        I added the following to

        netgate - upsmon.conf
        MONITOR netgateUPS@localhost 1 monmaster yyyyy master

        negate - ups.conf
        blanks no entries

        pi- ups.conf
        [powerStrip]
        driver = usbhid-ups
        port = auto
        vendorid = "051d"
        productid = "0002"
        desc = "APC BE600M1 600VA UPS"

        D 1 Reply Last reply Nov 14, 2022, 9:01 PM Reply Quote 0
        • D
          dennypage @netboy
          last edited by Nov 14, 2022, 9:01 PM

          @netboy said in NUT server and UPS general question:

          I added the following to
          netgate - upsmon.conf
          MONITOR netgateUPS@localhost 1 monmaster yyyyy master
          negate - ups.conf
          blanks no entries

          Something is wrong. ups.conf cannot be empty, and you should not need to edit upsmon.conf.

          Let's restart from the ground up and make sure we have a known, stable base.

          Go to Services -> UPS -> Settings.

          • Set "UPS Type" to "Local USB"
          • Set "UPS Name" to "ups"
          • Uncheck the "Enable notifications" box
          • Set "Driver" to "usbhid".
          • Clear any content in "Extra Arguments to driver"
          • Clear any content in all sections of "Advanced sections"

          After doing this, press save.

          Then, log in via terminal and execute the following:

          cat /usr/local/etc/nut/ups.conf
          cat /usr/local/etc/nut/upsd.conf
          cat /usr/local/etc/nut/upsd.users
          cat /usr/local/etc/nut/upsmon.conf
          

          And post the complete output of each.

          N 1 Reply Last reply Nov 14, 2022, 9:14 PM Reply Quote 1
          • N
            netboy @dennypage
            last edited by netboy Nov 14, 2022, 9:15 PM Nov 14, 2022, 9:14 PM

            @dennypage
            masked passwords

            [22.05-RELEASE][admin@router2100.tttt.local]/root: cat /usr/local/etc/nut/ups.conf
            [ups]
            driver=usbhid-ups
            port=auto
            [22.05-RELEASE][admin@router2100.tttt.local]/root: cat /usr/local/etc/nut/upsd.conf
            LISTEN 127.0.0.1
            LISTEN ::1
            [22.05-RELEASE][admin@router2100.tttt.local]/root: cat /usr/local/etc/nut/upsd.users
            [admin]
            password=xxxxx
            actions=set
            instcmds=all
            [local-monitor]
            password=xxxxx
            upsmon master
            [22.05-RELEASE][admin@router2100.tttt.local]/root: cat /usr/local/etc/nut/upsmon.conf
            MONITOR ups 1 local-monitor xxxxx master
            SHUTDOWNCMD "/sbin/shutdown -p +0"
            POWERDOWNFLAG /etc/killpower
            [22.05-RELEASE][admin@router2100.tttt.local]/root:

            D 1 Reply Last reply Nov 14, 2022, 9:49 PM Reply Quote 0
            • D
              dennypage @netboy
              last edited by dennypage Nov 14, 2022, 10:03 PM Nov 14, 2022, 9:49 PM

              @netboy Okay, that looks much better.

              Now add this

              [monuser]
              password = secret
              upsmon slave
              

              to "Additional configuration lines for upsd.users" in the Advanced settings section.

              Now go to this post and follow the instructions to allow access to the NUT port from the LAN interface. I recommend that you choose option 1.

              Following that, you can confirm operation by going to the pi and executing the following command:

              upsc ups@192.168.0.1
              [Based on prior posts, I am assuming that 192.168.0.1 is the LAN IP address of your pfSense firewall]

              When you run the upsc command, you should see all the variables of your UPS displayed.

              Lastly, for the pi end, put this in upsmon.conf:

              MONITOR ups@192.168.0.1 0 monuser secret slave
              
              N 1 Reply Last reply Nov 14, 2022, 10:00 PM Reply Quote 0
              • N
                netboy @dennypage
                last edited by Nov 14, 2022, 10:00 PM

                @dennypage I guess the MONITOR must be like below (see bold) - correct - Probably you have a typo?

                MONITOR ups@192.168.0.1 0 monuser secret slave

                D N 2 Replies Last reply Nov 14, 2022, 10:04 PM Reply Quote 0
                • D
                  dennypage @netboy
                  last edited by Nov 14, 2022, 10:04 PM

                  @netboy said in NUT server and UPS general question:

                  I guess the MONITOR must be like below (see bold) - correct - Probably you have a typo?
                  MONITOR ups@192.168.0.1 0 monuser secret slave

                  You are correct. I copied and pasted from another example. Sorry about that.

                  1 Reply Last reply Reply Quote 1
                  • N
                    netboy @netboy
                    last edited by netboy Nov 14, 2022, 10:10 PM Nov 14, 2022, 10:09 PM

                    @netboy SUCCESS!!!
                    I had to make an entry in hosts.conf for pi

                    MONITOR ups@192.168.0.1 "Netgate UPS"

                    Worked. I sincerely thank you very much for all your help.

                    login-to-view

                    login-to-view

                    login-to-view

                    N 1 Reply Last reply Nov 14, 2022, 10:15 PM Reply Quote 0
                    • N
                      netboy @netboy
                      last edited by Nov 14, 2022, 10:15 PM

                      @netboy Probably last question....

                      I want to shutdown everything attached to ups in netgate only when "battery low" in ups - How do I configure this functionality

                      D 1 Reply Last reply Nov 15, 2022, 12:16 AM Reply Quote 0
                      • D
                        dennypage @netboy
                        last edited by Nov 15, 2022, 12:16 AM

                        @netboy said in NUT server and UPS general question:

                        I want to shutdown everything attached to ups in netgate only when "battery low" in ups - How do I configure this functionality

                        Well, you are in luck... that is the default behavior of NUT. 😊

                        Anything else connected to the UPS that is capable of running NUT would monitor the master on pfSense just like the setup you did for the pi, with the exception being that they would use power value 1 rather than power value 0. Like so:

                        MONITOR ups@192.168.0.1 1 monuser secret slave
                        

                        All the hosts will shut down when the UPS declares a low battery situation. You can read more here.

                        N 1 Reply Last reply Nov 15, 2022, 12:18 AM Reply Quote 0
                        • N
                          netboy @dennypage
                          last edited by Nov 15, 2022, 12:18 AM

                          @dennypage πŸ‘ πŸ‘ πŸ‘

                          N 1 Reply Last reply Nov 15, 2022, 12:26 AM Reply Quote 0
                          • N
                            netboy @netboy
                            last edited by netboy Nov 15, 2022, 12:27 AM Nov 15, 2022, 12:26 AM

                            @netboy Since synology also uses NUT I am struggling to MONITOR the same using raspberry pi..... Created a user in

                            /usr/syno/etc/ups/upsd.users

                            [monslave]
                            password = xxxxxx
                            upsmon slave

                            Opened port 3493

                            Included entries in pi upsmon.conf :
                            MONITOR ups@{syn IP} 0 monslave xxxxxx slave

                            and hosts.conf:
                            MONITOR ups@{syn IP} "Synology UPS"

                            But get "access error"
                            login-to-view

                            login-to-view

                            Any suggestions....

                            1 Reply Last reply Reply Quote 0
                            • D
                              dennypage
                              last edited by Nov 15, 2022, 1:03 AM

                              @netboy Synology uses a hard-coded username/password for remote NUT access. You can either use their hard-coded values for monitoring (strongly recommended), or try to hand edit Synology's generated files. Note that if you go the hand-edit route, the files will overwritten by DSM whenever an OS update occurs and you will need to re-edit the files.

                              N 1 Reply Last reply Nov 15, 2022, 1:39 AM Reply Quote 0
                              • N
                                netboy @dennypage
                                last edited by netboy Nov 15, 2022, 1:54 AM Nov 15, 2022, 1:39 AM

                                @dennypage I used the built in user and configured my raspberry pi upsmon.conf as follows

                                MONITOR ups@{syn IP} 1 monuser secret slave
                                [used 1 above ok?]

                                Tried this as well [ 0 ] with same results.
                                MONITOR ups@{syn IP} 0 monuser secret slave

                                Tried pinging from raspberry pi and get the access denied mesg:

                                root@raspberrypi:/home/piNUT# upsc ups@{syn IP}
                                Init SSL without certificate database
                                Error: Access denied

                                N 1 Reply Last reply Nov 15, 2022, 2:30 AM Reply Quote 0
                                • N
                                  netboy @netboy
                                  last edited by Nov 15, 2022, 2:30 AM

                                  @netboy Never mind was able to mine your forum and I found a post from you here

                                  "egardless of the username/password, if you host on the Synology, you need explicitly list the IP address of pfSense in the list of permitted remote hosts in the Synology (Control Panel -> Hardware & Power -> UPS). This may have been why you were getting permission denied previously."

                                  And now it works!

                                  1 Reply Last reply Reply Quote 0
                                  • D
                                    dennypage
                                    last edited by Nov 15, 2022, 2:46 AM

                                    @netboy

                                    And now it works!

                                    😊

                                    N 1 Reply Last reply Nov 15, 2022, 2:49 AM Reply Quote 0
                                    • N
                                      netboy @dennypage
                                      last edited by Nov 15, 2022, 2:49 AM

                                      @dennypage I have to really thank you very much for such quick feedbacks in this forum. I have learned a lots from you and NUT documentation.

                                      Here is my finale!

                                      login-to-view

                                      Need to drink scotch now....Bye

                                      D 1 Reply Last reply Nov 15, 2022, 3:04 AM Reply Quote 2
                                      • D
                                        dennypage @netboy
                                        last edited by Nov 15, 2022, 3:04 AM

                                        @netboy You’re welcome. Glad you got everything working.

                                        1 Reply Last reply Reply Quote 0
                                        62 out of 71
                                        • First post
                                          62/71
                                          Last post
                                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.