Git Product home page Git Product logo

graylog-vscode-extension's Introduction

Graylog Pipeline rule

Thanks for using the Graylog Pipeline Rules API.

Features:

  • Retrieve the pipeline rules on your Graylog instance
  • Edit the rules directly
  • Save the rules back to the Server
  • Create a new Rule directly from your workspace
  • Live syntax highlighting - using your Graylog instance, so the version will always be correct

Before Using this Extension

Create a Graylog User token

  • Log in to your Graylog console
  • Click the user Pawn icon in the top right and choose 'Edit Profile'.
  • Click Edit Tokens on the far right
  • Create a new token with a meaningful name and copy it to clipboard

Configure the Settings

Open the Command Pallette

Windows: F1 Mac: CMD + SHIFT + P

Choose Graylog: Settings

Enter the following minimum details, you can enter multiple servers as objects:

{"graylogSettings":[
    {"serverUrl":"https://myinstance.graylog.cloud",
    "token":"c0ffeeb4d455",
    "name":"My Cloud"}, 
    {"serverUrl":"http://10.10.10.10:9000",
    "token":"beddedcafebabe",
    "name":"My Local Dev"}
]
}
serverUrl The url of the Graylog instance
token The access token used to contact the API. See above for instructions
name The Display Name for this instance

Using the Extension

Features

  • Connect to Multiple Graylog Instances (Global Clusters, Dev and Prod, Tenants)
  • Edit rules directly on a server
  • Save rules directly to a server
  • View currently assigned pipelines (Status Bar below)
  • Syntax highlighting
  • Syntax checking directly from API (avoid version mismatches)
  • Export Multiple Rules to Content Pack (BETA)
    • Activate the multiselect button on the top right of the extension view
    • Select Multiple Rules
    • Right Click (Or use Command Palette) - Export to Content Pack

graylog-vscode-extension's People

Contributors

csharpdragon avatar grownuphacker avatar ozair-dev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ozair-dev

graylog-vscode-extension's Issues

Not able to figure out how to install this or get it working. Unclear if its easier on Windows, but Mac its a no go

Whats happening

So far trying to figure out how to install this. I naively thought i could simple do >Developer: Install Extension from Location..., which does "install" the ext in so far as it appears in the ext list. However, when i attempt to configure the ext:

image

We get some clues as to whats wrong in the exthost.log, however, this is beyond my skillset and capabilities.

2023-03-27 16:05:50.210 [error] Activating extension Graylog-Labs.graylog-rules failed due to an error:
2023-03-27 16:05:50.210 [error] Error: Cannot find module 'axios'
Require stack:
- /Users/drewmiranda/git/graylog/graylog-vscode-extension/out/connectionpart.js
- /Users/drewmiranda/git/graylog/graylog-vscode-extension/out/extension.js
- /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js
- /Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-amd.js
- /Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-fork.js
- 
	at Module._resolveFilename (node:internal/modules/cjs/loader:987:15)
	at i._resolveFilename (node:electron/js2c/utility_init:17:840)
	at Module._load (node:internal/modules/cjs/loader:832:27)
	at c._load (node:electron/js2c/asar_bundle:5:13343)
	at c._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:122:14101)
	at m._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:117:62404)
	at D._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:117:61797)
	at Module.require (node:internal/modules/cjs/loader:1059:19)
	at p (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:699)
	at Object.<anonymous> (/Users/drewmiranda/git/graylog/graylog-vscode-extension/out/connectionpart.js:5:17)
	at u._compile (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:1313)
	at Module._extensions..js (node:internal/modules/cjs/loader:1220:10)
	at Module.load (node:internal/modules/cjs/loader:1035:32)
	at Module._load (node:internal/modules/cjs/loader:876:12)
	at c._load (node:electron/js2c/asar_bundle:5:13343)
	at c._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:122:14101)
	at m._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:117:62404)
	at D._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:117:61797)
	at Module.require (node:internal/modules/cjs/loader:1059:19)
	at p (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:699)
	at Object.<anonymous> (/Users/drewmiranda/git/graylog/graylog-vscode-extension/out/extension.js:5:26)
	at u._compile (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:1313)
	at Module._extensions..js (node:internal/modules/cjs/loader:1220:10)
	at Module.load (node:internal/modules/cjs/loader:1035:32)
	at Module._load (node:internal/modules/cjs/loader:876:12)
	at c._load (node:electron/js2c/asar_bundle:5:13343)
	at c._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:122:14101)
	at m._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:117:62404)
	at D._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:117:61797)
	at Module.require (node:internal/modules/cjs/loader:1059:19)
	at require (node:internal/modules/cjs/helpers:102:18)
	at Function.r [as __$__nodeRequire] (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:5:101)
	at f.qb (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:117:63668)
	at async Promise.all (index 0)

Cannot read properties of undefined (reading 'serverUrl')

I just found this interesting plugin and would like to try it out.

But... I can't get it to work.
I followed you're instructions and added the tokens and server information but when I try to see something in the Package Explorer/ Graylog I got the error message:
``´Cannot read properties of undefined (reading 'serverUrl')```

Can't see how I could've done anything wrong when adding the servers.

Getting Error no configured Url found

i have a new vscode instalaltion on a windows desktop with the latest version of the plugin. I have also set the settings as described.

I always got:
"Cannot read properties of undefined (reading 'serverUrl')"

When i try to fetch the rules.

There is a limit to how many pipeline rules are viewable

I noticed that not all of my pipeline riles (~200) appear in the sidebar. I don't have an exact count (Not sure of an easy way to count these items in the sidecar?) but my best guess is it shows about ~150 or so.

I did track down that the ext pulls ALL pipeline rules via /api/system/pipelines/rule so its not clear why its limiting how many are viewable in the sidebar.

I somewhat naively searched through the code to find a smoking gun like a limit or max or something but nothing stuck out.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.