Uploaded image for project: 'Metron (Retired)'
  1. Metron (Retired)
  2. METRON-484

Opentaxi service does not show count for subscribed services

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Done
    • Major
    • Resolution: Done
    • 0.2.1BETA
    • 0.3.0
    • None
    • 12 node cluster running CentOS 7 on Openstack.

    Description

      Steps Followed
      a) Created an ansible playbook for 'opentaxii' role and installed on a pre-deployed 12-node cluster with the following playbook definition:

      - hosts: metron
        become: true
        roles:
          - role: opentaxii
      

      b) Followed the documentation at:
      https://github.com/apache/incubator-metron/tree/master/metron-deployment/roles/opentaxii#getting-started

      c) Ensure that the opentaxii service is installed on the 'metron' nodes viz. 1, 3, 8, 10, 11 and 12.

      Observed on all the nodes that the 'status' command output is as follows:

      [root@metron-test-1 ~]# service opentaxii status
      Checking opentaxii...                             Running
      Services not defined
      

      Workaround
      In order to get around this issue, edit the file at /usr/local/opentaxii/bin/collection-status.py and change it to look like the below.

      <snip>
      from cabby import create_client
      
      base_uri = 'http://localhost:9000'
      
      try:
      
          # create a connection
          client = create_client(host='localhost',port=9000,discovery_path='/services/discovery')
      
          # iterate through each defined collection
          collections = client.get_collections(uri='%s/services/collection'%base_uri)
          for collection in collections:
      
              # how many records in each collection?
              count = client.get_content_count(collection_name=collection.name, uri='%s/services/poll'%base_uri)
              print "%-50s %-10d" % (collection.name, count.count)
      
      except:
      
          print "Services not defined"
      

      Attachments

        Issue Links

          Activity

            People

              nickwallen Nick Allen
              anandsubbu Anand Subramanian
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: