Ad Widget

Collapse

Time-Wait with UserParameter requesting rlmstat

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jeffrey_223
    Junior Member
    • Apr 2024
    • 6

    #1

    Time-Wait with UserParameter requesting rlmstat

    Hi there

    I'm a bit stuck on this one.
    I cannot seem to figure out how to stop the TIME_WAIT on this for UserParameter Requests.
    I found some posts on how to create the request
    Code:
    UserParameter=nuke_i.available,/opt/foundry/rlmutil rlmstat -avail -a -c 4101@foundry-lic | sed -n '/nuke_i/,$p'| grep nuke_i | awk -F'[^0-9]*' '{sum+=$4} END {print sum}'
    I'm just using the agent2 on my license servers and making the requests in using the conf file.
    I've managed to request everything I need.

    But after a while my license servers freak out and this is the output of netstat -an
    I thought to increase my ulimits but after increasing it, i found that rlm does this already by default already.
    Has anyone resolved this before?
    Is there something i can change in my .conf to eliminate this?

    Click image for larger version

Name:	image.png
Views:	122
Size:	71.9 KB
ID:	496792
  • Jeffrey_223
    Junior Member
    • Apr 2024
    • 6

    #2
    Anyone able to help me troubleshoot this?

    Comment

    • cyber
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Dec 2006
      • 4807

      #3
      If you run the same from command line (as user zabbix), is the behaviour same? Are you sure that command exits correctly and will not hang there...

      Comment

      • Jeffrey_223
        Junior Member
        • Apr 2024
        • 6

        #4
        I'll have no idea how to test that command out as the zabbix user?
        It should only be a single request at least that is if I make the request.
        But the Time_Wait only start appearing after about a month later.

        Comment

        • Blevar
          Member
          • Jan 2025
          • 68

          #5
          Try:
          Code:
          sudo -i -u your_zabbix_username
          /opt/foundry/rlmutil rlmstat -avail -a -c 4101@foundry-lic | sed -n '/nuke_i/,$p' | grep nuke_i | awk -F'[^0-9]*' '{sum+=$4} END {print sum}'

          Comment

          • Jeffrey_223
            Junior Member
            • Apr 2024
            • 6

            #6
            That's interesting if i run the cmd as user zabbix it returns nothing but the command does finish.
            I do get the result if i run it as me.
            And it is sending the correct results to the zabbix server.

            Not sure what I do from here?
            Is this telling me zabbix doesn't have permissions to run the
            Code:
            /opt/foundry/rlmutil rlmstat
            and i need to give it permissions in the user group?

            rlmutil do have execute rights for all users.

            Comment

            • Blevar
              Member
              • Jan 2025
              • 68

              #7
              You can add permissions to run this command for your zabbix username by running:
              Code:
              sudo visudo
              and then adding
              Code:
              your_username ALL=(your_zabbix_username) NOPASSWD: /opt/foundry/rlmutil rlmstat -avail -a -c 4101@foundry-lic | sed -n '/nuke_i/,$p' | grep nuke_i | awk -F'[^0-9]*' '{sum+=$4} END {print sum}'
              to the file. But be warned this is editing permissions on your platform. So it is better good if you know what you are doing.

              Comment

              • Jeffrey_223
                Junior Member
                • Apr 2024
                • 6

                #8
                But be warned this is editing permissions on your platform. So it is better good if you know what you are doing.
                Yeah, not sure I'm comfortable doing this one.

                Comment

                Working...