Questions tagged [rex]

(R)?ex is a server orchestration tool. Use the rexx tag if you want to refer to the REXX programming language.

(R)?ex is a server orchestration tool that doesn't need an agent on the hosts you want to manage. In fact it uses ssh to execute the given commands.

To use (R)?ex you don't need Perl knowledge at first. (R)?ex uses a simple DSL to describe your servers. Indeed, it is also possible to use (R)?ex from within your shell scripts without using perl at all.

In fact, if you know a little bit perl it won't hurt you.

The starting point of every (R)?ex project is the so called Rexfile. You can think of this file like a Makefile. You can define tasks in this file.

A task is a bunch of related commands. For example installing a package, uploading the configuration file and starting the service. You can also call tasks from other tasks or create rollback scenarios if something went wrong during the execution.

38 questions
4
votes
2 answers

Multiple Rex Expressions

I'm using the rex expressions below to search for the following fields in my raw data: Address Line 1 Address Line 2 Address Line 3 Address Line 4, and Postcode | rex "Address Line 1=(?[^,]*)" | rex "Address Line 2=(?[^,]*)" …
IRHM
  • 1,326
  • 11
  • 77
  • 130
4
votes
1 answer

Rex and identity files

I'm trying to configure a fi-ware cloud instance using Rex. What these instances (and probably other OpenStack-based systems) prove is a "identity file", a single private key that you can use to connect to them. I have been using variations of…
jjmerelo
  • 22,578
  • 8
  • 40
  • 86
3
votes
5 answers

Fortigate automation with perl or python

Goal I'm trying to automate a fortigate configuration change for a couple dozen routers and am not winning. Have tried Python's paramiko library, Python fabric and Perl's expect and Rex interfaces/libraries. Other info * Routers: Fortigate 60D *…
Bubnoff
  • 3,917
  • 3
  • 30
  • 33
2
votes
2 answers

Splunk Rex: Extracting fields of a string to a value

I'm a newbie to SPlunk trying to do some dashboards and need help in extracting fields of a particular variable Here in my case i want to extract only KB_List":"KB000119050,KB000119026,KB000119036" values to a column Expected…
Rczone
  • 493
  • 1
  • 5
  • 18
2
votes
1 answer

REQ: Assistance with Splunk - Rex Query

I'm having some issues with a rex query where a single digit date renders an incorrect result, but a double digit date provides the correct result. These are the log entries I'm querying: Mar 7 14:24:29 10.52.176.215 Mar 7 12:24:29 963568 -…
JoeTogo
  • 23
  • 3
2
votes
1 answer

Splunk: how to extract fields using regular expressions? like rex in splunk search

I want to extract Primary and StandyBy DB names from the below string which I found in my splunk search. Jul 20 14:43:31 XXXXXXXX GuptaA GuptaA - Primary database GuptaC - (*) Physical standby database GuptaB - Physical standby database. Jul 20…
Hadoop-worker
  • 196
  • 11
2
votes
3 answers

Regex simple replace document from dictionary hash (Perl)

I need to find and replace keywords from a hash in a large documents as fast as possible. I tired the below two methods, one is faster by 320% but I am sure I am doing this the wrong way and sure there is a better way to do it. The idea I want to…
daliaessam
  • 1,636
  • 2
  • 21
  • 43
1
vote
1 answer

(Splunk) How can I use the rex command to pattern match wildcards enclosed by double quotes?

EDIT - I have resolved this with a workaround but will attempt your suggestions as well to see which one I like better. I went through the "Extract new fields" process in Splunk and manually highlighted the data I want, then copied the…
fewrgw5yu
  • 11
  • 2
1
vote
2 answers

REGEX: To extract particular string from path

I am looking to extract particular string from path. For example, I have to extract 4th value separated by (.) from filename. which is "lm" in below…
Ankit Goyal
  • 151
  • 1
  • 12
1
vote
1 answer

Adding lambdas to my programming language

I am working on creating my own language using Rex and Racc, but I have gotten stuck. I am not sure how to add functions, or any kind of code that won't be immediately executed like a lambda. I have added blocks/lambdas into the language, but…
Addison
  • 3,791
  • 3
  • 28
  • 48
1
vote
0 answers

React Native Packager run transform before finding dependencies

I've been trying to create a module that makes it possible to define "aliases" for React Native modules. E.g. instead of require('../../../../../MyModule'); we could write require('MyModule'); and define an alias for this module with the correct…
thegaram
  • 767
  • 1
  • 6
  • 13
1
vote
1 answer

Splunk Rex Expression

I wonder whether someone could possibly help me please. Firstly my apologies for what may seem a simple question, but I'm really struggling with this. I'm trying to extract a nino field from my raw data in Splunk which is in the following format…
IRHM
  • 1,326
  • 11
  • 77
  • 130
1
vote
1 answer

Splunk: How to grab certain section from result in splunk?

I am using this query in splunk search - index="some_index" | dedup source | sort -source | dedup sourcetype | table sourcetype, source My result shows like this - sourcetype source ----------- …
Nd098
  • 23
  • 4
0
votes
1 answer

Splunk: How to extract a field containing spaces at end

I try to extract the value of a field that contains spaces. Apparently it is hard to find a regular expression for this case (even the question is if it is possible at all). Example: 03 Container ID - ALL_ELIGIBLE_STG_RTAIN Offer Set ID From Above…
venkat
  • 1
0
votes
1 answer

Splunk rex Search - Unable to tabulate because of NULL

I want to extract "TimesAccesed" from the message field. Message: PublicDomainAPI.SaveAsync: progresses =…
1
2 3