예제 #1
0
def get_params_parser_create_dash():
    """Parse command line arguments"""

    parser = argparse.ArgumentParser(
        usage="usage: kidash [options]",
        description="Import or Export a Kibana Dashboard")

    ElasticOcean.add_params(parser)

    parser.add_argument("--dashboard", help="Kibana dashboard id to export")
    parser.add_argument("--export",
                        dest="export_file",
                        help="file with the dashboard exported")
    parser.add_argument("--import",
                        dest="import_file",
                        help="file with the dashboard to be imported")
    parser.add_argument("--kibana",
                        dest="kibana_index",
                        default=".kibana",
                        help="Kibana index name (.kibana default)")
    parser.add_argument("--list",
                        action='store_true',
                        help="list available dashboards")
    parser.add_argument('-g', '--debug', dest='debug', action='store_true')

    return parser
예제 #2
0
파일: o2s.py 프로젝트: navyaroy/GrimoireELK
def get_params():
    ''' Get params definition from ElasticOcean '''
    parser = argparse.ArgumentParser()
    ElasticOcean.add_params(parser)

    # Commands supported

    parser.add_argument("--index", help="Ocean index with identities to extract")

    args = parser.parse_args()

    return args
예제 #3
0
파일: o2s.py 프로젝트: jgbarah/GrimoireELK
def get_params():
    ''' Get params definition from ElasticOcean '''
    parser = argparse.ArgumentParser()
    ElasticOcean.add_params(parser)

    # Commands supported

    parser.add_argument("--index", help="Ocean index with identities to extract")

    args = parser.parse_args()

    return args
예제 #4
0
파일: e2k.py 프로젝트: jgbarah/GrimoireELK
def get_params_parser_create_dash():
    """Parse command line arguments"""

    parser = argparse.ArgumentParser(usage="usage: e2k.py [options]",
                                     description="Create a Kibana dashboard from a template")

    ElasticOcean.add_params(parser)

    parser.add_argument("-d", "--dashboard", help="dashboard to be used as template")
    parser.add_argument("-i", "--index", help="enriched index to be used as data source")
    parser.add_argument("--kibana", dest="kibana_index", default=".kibana",
                        help="Kibana index name (.kibana default)")
    parser.add_argument('-g', '--debug', dest='debug', action='store_true')

    return parser
예제 #5
0
def get_params_parser():
    """Parse command line arguments"""

    parser = argparse.ArgumentParser()

    ElasticOcean.add_params(parser)

    parser.add_argument('-g', '--debug', dest='debug', action='store_true')
    parser.add_argument('-t', '--token', dest='token', help="GitHub token")
    parser.add_argument('-o',
                        '--org',
                        dest='org',
                        help='GitHub Organization to be analyzed')
    parser.add_argument('-c',
                        '--contact',
                        dest='contact',
                        help='Contact (mail) to notify events.')
    parser.add_argument('--twitter',
                        dest='twitter',
                        help='Twitter account to notify.')
    parser.add_argument(
        '-w',
        '--web-dir',
        default='/var/www/cauldron/dashboards',
        dest='web_dir',
        help='Redirect HTML project pages for accessing Kibana dashboards.')
    parser.add_argument('-k',
                        '--kibana-url',
                        default='https://dashboard.cauldron.io',
                        dest='kibana_url',
                        help='Kibana URL.')
    parser.add_argument('-u',
                        '--graas-url',
                        default='https://cauldron.io',
                        dest='graas_url',
                        help='GraaS service URL.')
    parser.add_argument(
        '-n',
        '--nrepos',
        dest='nrepos',
        type=int,
        default=NREPOS,
        help=
        'Number of GitHub repositories from the Organization to be analyzed (default:10)'
    )

    return parser
예제 #6
0
def get_params():
    ''' Get params definition from ElasticOcean '''
    parser = argparse.ArgumentParser()
    ElasticOcean.add_params(parser)

    # Commands supported

    parser.add_argument("-l", "--list",  action='store_true',
                        help="Lists repositories")
    parser.add_argument("-r", "--remove",
                        help="Remove a repository")
#     parser.add_argument("--rename",
#                         help="Rename a repository")

    args = parser.parse_args()

    return args
예제 #7
0
def get_params_parser_create_dash():
    """Parse command line arguments"""

    parser = argparse.ArgumentParser(usage="usage: kidash [options]",
                                     description="Import or Export a Kibana Dashboard")

    ElasticOcean.add_params(parser)

    parser.add_argument("--dashboard", help="Kibana dashboard id to export")
    parser.add_argument("--export", dest="export_file", help="file with the dashboard exported")
    parser.add_argument("--import", dest="import_file", help="file with the dashboard to be imported")
    parser.add_argument("--kibana", dest="kibana_index", default=".kibana", help="Kibana index name (.kibana default)")
    parser.add_argument("--list", action='store_true', help="list available dashboards")
    parser.add_argument('-g', '--debug', dest='debug', action='store_true')
    parser.add_argument("--data-sources", nargs='+', dest="data_sources", help="Data sources to be included")

    return parser
예제 #8
0
def get_params_parser_create_dash():
    """Parse command line arguments"""

    parser = argparse.ArgumentParser(
        usage="usage: e2k.py [options]",
        description="Create a Kibana dashboard from a template")

    ElasticOcean.add_params(parser)

    parser.add_argument("-d",
                        "--dashboard",
                        help="dashboard to be used as template")
    parser.add_argument("-i",
                        "--index",
                        help="enriched index to be used as data source")
    parser.add_argument("--kibana",
                        dest="kibana_index",
                        default=".kibana",
                        help="Kibana index name (.kibana default)")
    parser.add_argument('-g', '--debug', dest='debug', action='store_true')

    return parser
예제 #9
0
파일: gelk.py 프로젝트: jgbarah/GrimoireELK
    for connector in connectors:
        backend = connector[0]
        if backend.get_name() == name:
            found = connector

    return found


if __name__ == '__main__':

    connectors = [[Bugzilla, BugzillaOcean, BugzillaEnrich],
                  [GitHub, GitHubOcean, GitHubEnrich],
                  [Gerrit, GerritOcean, GerritEnrich]]  # Will come from Registry

    parser = argparse.ArgumentParser()
    ElasticOcean.add_params(parser)

    subparsers = parser.add_subparsers(dest='backend',
                                       help='perceval backend')

    for connector in connectors:
        name = connector[0].get_name()
        subparser = subparsers.add_parser(name, help='gelk %s -h' % name)
        # We need params for feed
        connector[0].add_params(subparser)

    args = parser.parse_args()

    app_init = datetime.now()

    backend_name = args.backend
예제 #10
0
        backend = connector[0]
        if backend.get_name() == name:
            found = connector

    return found


if __name__ == '__main__':

    connectors = [[Bugzilla, BugzillaOcean, BugzillaEnrich],
                  [GitHub, GitHubOcean, GitHubEnrich],
                  [Gerrit, GerritOcean,
                   GerritEnrich]]  # Will come from Registry

    parser = argparse.ArgumentParser()
    ElasticOcean.add_params(parser)

    subparsers = parser.add_subparsers(dest='backend', help='perceval backend')

    for connector in connectors:
        name = connector[0].get_name()
        subparser = subparsers.add_parser(name, help='gelk %s -h' % name)
        # We need params for feed
        connector[0].add_params(subparser)

    args = parser.parse_args()

    app_init = datetime.now()

    backend_name = args.backend