Examples of Input


Examples of org.graylog2.inputs.Input

            LOG.error("Radio <{}> not found.", radioId);
            throw new NotFoundException("Radio <" + radioId + "> not found.");
        }

        try {
            final Input input = inputService.findForThisRadioOrGlobal(radioId, inputId);
            if (!input.isGlobal())
                inputService.destroy(input);
        } catch (org.graylog2.database.NotFoundException e) {
            throw new NotFoundException(e);
        }
View Full Code Here

Examples of org.graylog2.inputs.Input

                        new CacheLoader<String, Optional<MessageInput>>() {
                            @Override
                            public Optional<MessageInput> load(String key) throws Exception {
                                LOG.debug("Loading message input {}", key);
                                try {
                                    final Input input = inputService.find(key);
                                    return Optional.fromNullable(inputService.buildMessageInput(input));
                                } catch (NotFoundException | NoSuchInputTypeException e) {
                                    return Optional.absent();
                                }
                            }
View Full Code Here

Examples of org.graylog2.inputs.Input

            return cache.get(inputId, new Callable<List<Extractor>>() {
                @Override
                public List<Extractor> call() throws Exception {
                    LOG.debug("Re-loading extractors for input <{}> into cache.", inputId);

                    Input input = inputService.find(inputId);

                    List<Extractor> sorted = Lists.newArrayList(inputService.getExtractors(input));

                    Collections.sort(sorted, new Comparator<Extractor>() {
                        public int compare(Extractor e1, Extractor e2) {
View Full Code Here

Examples of org.graylog2.restclient.models.Input

    public Result io(String nodeId, String inputId) {
        try {
            Map<String, Object> result = Maps.newHashMap();

            final Node node = nodeService.loadNode(nodeId);
            final Input input = node.getInput(inputId);
            final Input.IoStats ioStats = input.getIoStats();

            result.put("total_rx", Tools.byteToHuman(ioStats.readBytesTotal));
            result.put("total_tx", Tools.byteToHuman(ioStats.writtenBytesTotal));
            result.put("rx", Tools.byteToHuman(ioStats.readBytes));
            result.put("tx", Tools.byteToHuman(ioStats.writtenBytes));
View Full Code Here

Examples of org.graylog2.restclient.models.Input

    }

    public Result globaIO(String inputId) {
        Map<String, Object> result = Maps.newHashMap();

        final Input globalInput;
        try {
            globalInput = nodeService.loadMasterNode().getInput(inputId);
            if (!globalInput.getGlobal()) {
                return badRequest();
            }
        } catch (IOException e) {
            log.error("Could not load input.");
            return internalServerError();
View Full Code Here

Examples of org.graylog2.restclient.models.Input

    public Result connections(String nodeId, String inputId) {
        try {
            Map<String, Object> result = Maps.newHashMap();

            final Node node = nodeService.loadNode(nodeId);
            final Input input = node.getInput(inputId);

            result.put("active", input.getConnections());
            result.put("total", input.getTotalConnections());

            return ok(Json.toJson(result));
        } catch (IOException e) {
            return internalServerError("io exception");
        } catch (APIException e) {
View Full Code Here

Examples of org.graylog2.restclient.models.Input

    private MessagesService messagesService;

    public Result manage(String nodeId, String inputId) {
        try {
            Node node = nodeService.loadNode(nodeId);
            Input input = node.getInput(inputId);

            return ok(views.html.system.inputs.extractors.manage.render(
                            currentUser(),
                            standardBreadcrumbs(node, input),
                            node,
View Full Code Here

Examples of org.graylog2.restclient.models.Input

    }

    public Result manageGlobal(String inputId) {
        try {
            Node node = nodeService.loadMasterNode();
            Input input = node.getInput(inputId);

            return ok(views.html.system.inputs.extractors.manage.render(
                            currentUser(),
                            standardBreadcrumbs(node, input),
                            node,
View Full Code Here

Examples of org.graylog2.restclient.models.Input

    }

    public Result newExtractor(String nodeId, String inputId, String extractorType, String field, String exampleIndex, String exampleId) {
        try {
            Node node = nodeService.loadNode(nodeId);
            Input input = node.getInput(inputId);
            MessageResult exampleMessage = messagesService.getMessage(exampleIndex, exampleId);
            String example = exampleMessage.getFields().get(field).toString();

            return ok(views.html.system.inputs.extractors.new_extractor.render(
                            currentUser(),
View Full Code Here

Examples of org.graylog2.restclient.models.Input

    }

    public Result exportExtractors(String nodeId, String inputId) {
        try {
            Node node = nodeService.loadNode(nodeId);
            Input input = node.getInput(inputId);

            BreadcrumbList bc = standardBreadcrumbs(node, input);
            bc.addCrumb("Export", controllers.routes.ExtractorsController.exportExtractors(nodeId, inputId));

            Map<String, Object> result = Maps.newHashMap();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.