Ad Widget

Collapse

Item to monitor license usage

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • limbooface
    Member
    • Jun 2016
    • 77

    #1

    Item to monitor license usage

    I wish to monitor license usage for a particular license so that I can determine if we need to buy new licenses.

    I have created a UserParameter in zabbix_agentd.conf

    The UserParameter is:
    UserParameter=arnold.status[*],rlmutil rlmstat -a -c 5055@server | sed -n '/arnold/,$p'|grep count | cut -c 40-40

    Then I created a Item for that server and a graph but I am getting no graph being made. Is my UserParameter correct?

    For the Item my key is: arnold.status[0]
    Type of information is: Numeric(unsigned)
    Data type: Decimal
    Use custom multiplier: 1
    Applications: Arnold
    Enabled: tick

    Is the item type correct? If anyone can help would be much appreciated.

    Thanks
  • mortuletti
    Member
    • May 2016
    • 76

    #2
    Hi!
    First of all, run command locally - "rlmutil rlmstat -a -c 5055@server | sed -n '/arnold/,0'|grep count | cut -c 40-40". Should get desired number.
    If you get result as expected, check key parameters.

    Could be "UnsafeUserParameters" setting is not set. Description is here - https://www.zabbix.com/documentation...userparameters

    As well can check Zabbix Agent and Server log files. On CentOS, package installation it is located /var/log/zabbix/zabbix_server.log and /var/log/zabbix/zabbix_agent.log

    P.S. to apply User Parameters agent need to be restarted;
    to increase/decrease Zabbix server log level can use "zabbix_server -R log_level_increase" and "zabbix_server -R log_level_decrease" commands;

    Regards,
    Alexander

    Comment

    • limbooface
      Member
      • Jun 2016
      • 77

      #3
      Thanks for some help

      I have enabled now the UnsafeUserParameters and restarted the agent on the client license machine.

      My command:
      rlmutil rlmstat -a -c 5055@server | sed -n '/arnold/,$p'|grep count | cut -c 40-40
      Is giving me results in the terminal.

      your command:rlmutil rlmstat -a -c 5055@server | sed -n '/arnold/,0'|grep count | cut -c 40-40
      Is giving me an error: sed: -e expression #1, char 10: missing command

      I am still getting no data in my graph.

      Is my item created correct?

      Thanks for your help

      Comment

      • mortuletti
        Member
        • May 2016
        • 76

        #4
        So, use command you get results in the terminal.
        Put line in zabbix_agent.config file:
        UserParameter=arnold.status,rlmutil rlmstat -a -c 5055@server | sed -n '/arnold/,$p'|grep count | cut -c 40-40
        And for Item key: arnold.status

        After change is done, restart agent and wait for some 5-10 minutes.

        If nothing helps, can you attach Zabbix agent and server log files?
        Br, Alex

        P.S. just to check. Are you creating item with Active Type of check?

        Comment

        • mortuletti
          Member
          • May 2016
          • 76

          #5
          If no data is collected using Item, you should have some information in the right side (like attached)
          Please attach log file of Zabbix server. If installed on CentOS from Packages should be located in /var/log/zabbix/zabbix_server.log
          Thank you!
          Br, Alexander
          Attached Files

          Comment

          • limbooface
            Member
            • Jun 2016
            • 77

            #6
            Hi,

            Yes its a zabbix active check.

            I just noticed that my UserParameter=arnold.status was UserParameter=arnold.status[*]

            I have removed the[*] in the item and in zabbix_agent.conf file

            so my item now reads in the key field: arnold.status

            and my zabbix_agentd.conf now reads:
            UserParameter=arnold.status,rlmutil rlmstat -a -c 5055@server | sed -n '/arnold/,$p'|grep count | cut -c 40-40

            after restarting the zabbix-agent in the agent log i get:

            2457:20160704:160902.305 active check "arnold.status[0]" is not supported: Item does not allow parameters.

            In the server log I get:
            8913:20160704:131824.467 Item [Zabbix server:arnold.status[0]] error: Unsupported item key.

            But my item key is now arnold.status not arnold.status[0].

            I am missing something here?
            Thanks for your help.

            Comment

            • mortuletti
              Member
              • May 2016
              • 76

              #7
              Just wait some time.
              To renew configuration on server side can run:
              zabbix_server -R config_cache_reload
              After configuration updated in log file should get some info about Item without [0]
              Br, Alexander

              Comment

              • limbooface
                Member
                • Jun 2016
                • 77

                #8
                Also i noticed when I went to the item type the status is saying not supported:

                Received value[10] is not suitable for value type [Numeric (unsigned)] and data type [Decimal]

                Comment

                • limbooface
                  Member
                  • Jun 2016
                  • 77

                  #9
                  Just to mention this item type has been created inside the zabbix's Template OS Linux.

                  I have Disabled the item type and re-enabled it and the not supported has gone and says enabled.

                  Just waiting on server logs to recognise the new item key without the[*].

                  Comment

                  • mortuletti
                    Member
                    • May 2016
                    • 76

                    #10
                    Good!
                    Configuration updated.
                    So, "10" looks good, but for some reason Zabbix does not want to save it to the database.
                    If after some 10-20 minutes will be the same error message, try to switch to Numeric(float) (just to check)
                    Br, Alexander

                    Comment

                    • mortuletti
                      Member
                      • May 2016
                      • 76

                      #11
                      Just got last message.
                      Good. Let's wait until updated.
                      Br, Alexander

                      Comment

                      • limbooface
                        Member
                        • Jun 2016
                        • 77

                        #12
                        I removed the item type from the OS linux template and created a new template for arnold as I noticed in the server logs that all my servers in the OS linux template were complaining about arnold missing key.

                        So now I have a template, a item, and a graph just assigned to 1 server not all my linux servers. so I will try your Numeric float in 10min if this does not work.

                        Thanks for your help and time much appreciated.

                        Comment

                        • limbooface
                          Member
                          • Jun 2016
                          • 77

                          #13
                          I changed to Numeric float and still no data in the graph.

                          Comment

                          • limbooface
                            Member
                            • Jun 2016
                            • 77

                            #14
                            just checked the item and it showing a red cross that
                            received vale [10] not suitable for value type Numeric float

                            Comment

                            • limbooface
                              Member
                              • Jun 2016
                              • 77

                              #15
                              server log

                              error reason for "server.unionvfx.local:arnold.status" changed: Received value [11] is not suitable for value type [Numeric (unsigned)] and data type [Decimal]
                              120924:20160704:163114.818 error reason for "server.unionvfx.local:arnold.status" changed: Received value [10] is not suitable for value type [Numeric (unsigned)] and data type [Decimal]

                              Comment

                              Working...