From 95b5762cdbcdfa3d2a0b7f1dc3b8c16fd64dedcf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 22 Oct 2024 02:02:59 +0000 Subject: [PATCH] Update OAFP examples --- docs/guides/oafp/oafp-examples.md | 500 +++++++++++++++--------------- 1 file changed, 255 insertions(+), 245 deletions(-) diff --git a/docs/guides/oafp/oafp-examples.md b/docs/guides/oafp/oafp-examples.md index 772d017..323cb2e 100644 --- a/docs/guides/oafp/oafp-examples.md +++ b/docs/guides/oafp/oafp-examples.md @@ -38,129 +38,130 @@ Examples of use of _oafp_ avaiable also in [https://ojob.io/oafp-examples.yaml]( | Chart | Unix | [23](#23) | Output a chart with the current Unix load using uptime | | DB | H2 | [24](#24) | Perform a SQL query over a H2 database. | | DB | H2 | [25](#25) | Store the json result of a command into a H2 database table. | -| DB | SQLite | [26](#26) | Perform a query over a database using JDBC. | -| DB | SQLite | [27](#27) | Store the json result on a SQLite database table. | -| Diff | Envs | [28](#28) | Given two JSON files with environment variables performs a diff and returns a colored result with the corresponding differences | -| Diff | Lines | [29](#29) | Performing a diff between two long command lines to spot differences | -| Diff | Path | [30](#30) | Given two JSON files with the parsed PATH environment variable performs a diff and returns a colored result with the corresponding differences | -| Docker | Containers | [31](#31) | Output a table with the list of running containers. | -| Docker | Listing | [32](#32) | List all containers with the docker-compose project, service name, file, id, name, image, creation time, status, networks and ports. | -| Docker | Listing | [33](#33) | List all containers with their corresponding labels parsed and sorted. | -| Docker | Network | [34](#34) | Output a table with the docker networks info. | -| Docker | Registry | [35](#35) | List all a table of docker container images repository and corresponding tags of a private registry. | -| Docker | Registry | [36](#36) | List all the docker container image repositories of a private registry. | -| Docker | Registry | [37](#37) | List all the docker container image repository tags of a private registry. | -| Docker | Stats | [38](#38) | Output a table with the docker stats broken down for each value. | -| Docker | Storage | [39](#39) | Output a table with the docker volumes info. | -| ElasticSearch | Cluster | [40](#40) | Get an ElasticSearch/OpenSearch cluster nodes overview | -| ElasticSearch | Cluster | [41](#41) | Get an ElasticSearch/OpenSearch cluster per host data allocation | -| ElasticSearch | Cluster | [42](#42) | Get an ElasticSearch/OpenSearch cluster settings flat | -| ElasticSearch | Cluster | [43](#43) | Get an ElasticSearch/OpenSearch cluster settings non-flatted | -| ElasticSearch | Cluster | [44](#44) | Get an ElasticSearch/OpenSearch cluster stats per node | -| ElasticSearch | Cluster | [45](#45) | Get an overview of an ElasticSearch/OpenSearch cluster health | -| ElasticSearch | Indices | [46](#46) | Get an ElasticSearch/OpenSearch count per index | -| ElasticSearch | Indices | [47](#47) | Get an ElasticSearch/OpenSearch indices overview | -| ElasticSearch | Indices | [48](#48) | Get an ElasticSearch/OpenSearch settings for a specific index | -| GPU | Nvidia | [49](#49) | Builds a grid with two charts providing a visualization over a Nvidia GPU usage and the corresponding memory usage for a specific GPU_IDX (gpu index) | -| GPU | Nvidia | [50](#50) | Get current Nvidia per-gpu usage | -| Generic | Arrays | [51](#51) | Converting an array of strings into an array of maps | -| Generic | Avro | [52](#52) | Given an Avro data file outputs it's corresponding statistics | -| Generic | Avro | [53](#53) | Given an Avro data file outputs the correspoding schema | -| Generic | Avro | [54](#54) | Reads an Avro data file as input | -| Generic | Avro | [55](#55) | Write an Avro data file as an output | -| Generic | Base64 | [56](#56) | Encode/decode data (or text-like files) to/from gzip base64 representation for easier packing and transport. | -| Generic | Excel | [57](#57) | Building an Excel file with the AWS IPv4 and IPv6 ranges (1). | -| Generic | Excel | [58](#58) | Building an Excel file with the AWS IPv4 and IPv6 ranges (2). | -| Generic | Excel | [59](#59) | Building an Excel file with the AWS IPv4 and IPv6 ranges (3). | -| Generic | Excel | [60](#60) | Processes each json file in /some/data creating and updating the data.xlsx file with a sheet for each file. | -| Generic | Excel | [61](#61) | Store and retrieve data from an Excel spreadsheet | -| Generic | HTML | [62](#62) | Generate a HTML with table of emoticons/emojis by category, group, name, unicode and html code. | -| Generic | Hex | [63](#63) | Outputs an hexadecimal representation of the characters of the file provided allowing to adjust how many per line/row. | -| Generic | List files | [64](#64) | After listing all files and folders recursively producing a count table by file extension. | -| Generic | RSS | [65](#65) | Builds an HTML file with the current linked news titles, publication date and source from Google News RSS. | -| Generic | RSS | [66](#66) | Example of generating a HTML list of titles, links and publication dates from a RSS feed | -| Generic | RSS | [67](#67) | Parses the Slashdot's RSS feed news into a quick clickable HTML page in a browser | -| Generic | Template | [68](#68) | Given a meal name will search 'The Meal DB' site for the corresponding recipe and render a markdown HTML of the corresponding recipe. | -| Generic | Text | [69](#69) | Get a json with lyrics of a song. | -| Generic | Text | [70](#70) | Search a word in the English dictionary returning phonetic, meanings, synonyms, antonyms, etc. | -| GitHub | Releases | [71](#71) | Builds a table of GitHub project releases | -| GitHub | Releases | [72](#72) | Parses the latest GitHub project release markdown notes | -| Grid | Java | [73](#73) | Parses a Java hsperf data + the current rss java process memory into a looping grid. | -| Grid | Java | [74](#74) | Parses a Java hsperf data into a looping grid. | -| Grid | Kubernetes | [75](#75) | Displays a continuous updating grid with a line chart with the number of CPU throtlles and bursts recorded in the Linux cgroup cpu stats of a container running in Kubernetes and the source cpu.stats data | -| Grid | Mac | [76](#76) | Shows a grid with the Mac network metrics and 4 charts for in, out packets and in, out bytes | -| Grid | Mac | [77](#77) | Shows a grid with the Mac storage metrics and 4 charts for read, write IOPS and read, write bytes per second | -| Grid | Unix | [78](#78) | On an Unix/Linux system supporting 'ps' output formats %cpu and %mem, will output a chart with the percentage of cpu and memory usage of a provided pid (e.g. 12345) | -| JSON Schemas | Lists | [79](#79) | Get a list of JSON schemas from Schema Store catalog | -| Kubernetes | Containers | [80](#80) | Parse the Linux cgroup cpu stats on a container running in Kubernetes | -| Kubernetes | Kubectl | [81](#81) | Build an output table with Kubernetes pods with namespace, pod name, container name and corresponding resources using kubectl | -| Kubernetes | Kubectl | [82](#82) | Build an output table with Kubernetes pods with node, namespace, pod name, container name and corresponding resources using kubectl | -| Kubernetes | Kubectl | [83](#83) | Executes a recursive file list find command in a specific pod, namespace and path converting the result into a table. | -| Kubernetes | Kubectl | [84](#84) | Given the list of all Kubernetes objects will produce a list of objects per namespace, kind, apiVersiom, creation timestamp, name and owner. | -| Kubernetes | Kubectl | [85](#85) | List of Kubernetes CPU, memory and storage stats per node using kubectl | -| Kubernetes | Kubectl | [86](#86) | List of Kubernetes pods per namespace and kind using kubectl | -| Kubernetes | Kubectl | [87](#87) | Produces a list of pods' containers per namespace with the corresponding images and assigned nodes. | -| Kubernetes | PVC | [88](#88) | Produces a table with all Kubernetes persistent volume claims (PVCs) in use by pods. | -| Mac | Activity | [89](#89) | Uses the Mac terminal command 'last' output to build an activity table with user, tty, from, login-time and logout-time | -| Mac | Brew | [90](#90) | List all the packages and corresponding versions installed in a Mac by brew. | -| Mac | Info | [91](#91) | Parses the current Mac OS hardware information | -| Mac | Info | [92](#92) | Parses the current Mac OS overview information | -| Mac | Safari | [93](#93) | Get a list of all Mac OS Safari bookmarks into a CSV file. | -| Mac | Tunnelblink | [94](#94) | In a Mac OS with Tunnelblink, if you want to copy all your OpenVPN configurations into ovpn files. | -| Network | ASN | [95](#95) | Retrieve an IP to ASN list list and converts it to ndjson | -| Network | ASN | [96](#96) | Retrieve the list of ASN number and names from RIPE and transforms it to a CSV. | -| Network | Latency | [97](#97) | Given a host and a port will display a continuously updating line chart with network latency, in ms, between the current device and the target host and port | -| Ollama | List models | [98](#98) | Parses the list of models currently in an Ollama deployment | -| OpenAF | Channels | [99](#99) | Copy the json result of a command into an etcd database using OpenAF's channels | -| OpenAF | Channels | [100](#100) | Getting all data stored in an etcd database using OpenAF's channels | -| OpenAF | Channels | [101](#101) | Given a Prometheus database will query for a specific metric (go_memstats_alloc_bytes), during a defined period, every 5 seconds (step) will produce a static chart with the corresponding metric values. | -| OpenAF | Channels | [102](#102) | Perform a query to a metric & label, with a start and end time, to a Prometheus server using OpenAF's channels | -| OpenAF | Channels | [103](#103) | Retrieve all keys stores in a H2 MVStore file using OpenAF's channels | -| OpenAF | Channels | [104](#104) | Store and retrieve data from a Redis database | -| OpenAF | Channels | [105](#105) | Store and retrieve data from a RocksDB database | -| OpenAF | Channels | [106](#106) | Store the json results of a command into a H2 MVStore file using OpenAF's channels | -| OpenAF | Network | [107](#107) | List all MX (mail servers) network addresses from the current DNS server for a hostname using OpenAF | -| OpenAF | Network | [108](#108) | List all network addresses returned from the current DNS server for a hostname using OpenAF | -| OpenAF | OS | [109](#109) | Current OS information visible to OpenAF | -| OpenAF | OS | [110](#110) | Using OpenAF parse the current environment variables | -| OpenAF | OpenVPN | [111](#111) | Using OpenAF code to perform a more complex parsing of the OpenVPN status data running on an OpenVPN container (nmaguiar/openvpn) called 'openvpn' | -| OpenAF | SFTP | [112](#112) | Generates a file list with filepath, size, permissions, create and last modified time from a SFTP connection with user and password | -| OpenAF | SFTP | [113](#113) | Generates a file list with filepath, size, permissions, create and last modified time from a SFTP connection with user, private key and password | -| OpenAF | TLS | [114](#114) | List the TLS certificates of a target host with a sorted alternative names using OpenAF | -| OpenAF | oJob.io | [115](#115) | Parses ojob.io/news results into a clickable news title HMTL page. | -| OpenAF | oJob.io | [116](#116) | Retrieves the list of oJob.io's jobs and filters which start by 'ojob.io/news' to display them in a rectangle | -| OpenAF | oPacks | [117](#117) | Listing all currently accessible OpenAF's oPacks | -| OpenAF | oafp | [118](#118) | Filter the OpenAF's oafp examples list by a specific word in the description | -| OpenAF | oafp | [119](#119) | List the OpenAF's oafp examples by category, sub-category and description | -| OpenVPN | List | [120](#120) | When using the container nmaguiar/openvpn it's possible to convert the list of all clients order by expiration/end date | -| Unix | Activity | [121](#121) | Uses the Linux command 'last' output to build a table with user, tty, from and period of activity | -| Unix | Alpine | [122](#122) | List all installed packages in an Alpine system | -| Unix | Compute | [123](#123) | Parses the Linux /proc/cpuinfo into an array | -| Unix | Debian/Ubuntu | [124](#124) | List all installed packages in a Debian/Ubuntu system | -| Unix | Envs | [125](#125) | Converts the Linux envs command result into a table of environment variables and corresponding values | -| Unix | Files | [126](#126) | Converting the Linux's /etc/os-release to SQL insert statements. | -| Unix | Files | [127](#127) | Converting the Unix's syslog into a json output. | -| Unix | Files | [128](#128) | Executes a recursive file list find command converting the result into a table. | -| Unix | Files | [129](#129) | Parses the Linux /etc/passwd to a table order by uid and gid. | -| Unix | Generic | [130](#130) | Creates, in unix, a data.ndjson file where each record is formatted from json files in /some/data | -| Unix | Memory map | [131](#131) | Given an Unix process will output a table with process's components memory address, size in bytes, permissions and owner | -| Unix | Network | [132](#132) | Loop over the current Linux active network connections | -| Unix | Network | [133](#133) | Parse the Linux 'arp' command output | -| Unix | Network | [134](#134) | Parse the Linux 'ip tcp_metrics' command | -| Unix | Network | [135](#135) | Parse the result of the Linux route command | -| Unix | OpenSuse | [136](#136) | List all installed packages in an OpenSuse system or zypper based system | -| Unix | RedHat | [137](#137) | List all installed packages in a RedHat system or rpm based system (use rpm --querytags to list all fields available) | -| Unix | Storage | [138](#138) | Converting the Unix's df output | -| Unix | Storage | [139](#139) | Parses the result of the Unix ls command | -| Unix | SystemCtl | [140](#140) | Converting the Unix's systemctl list-timers | -| Unix | SystemCtl | [141](#141) | Converting the Unix's systemctl list-units | -| Unix | SystemCtl | [142](#142) | Converting the Unix's systemctl list-units into an overview table | -| Unix | UBI | [143](#143) | List all installed packages in an UBI system | -| Unix | named | [144](#144) | Converts a Linux's named log, for client queries, into a CSV | -| Windows | Network | [145](#145) | Output a table with the current route table using Windows' PowerShell | -| Windows | Network | [146](#146) | Output a table with the list of network interfaces using Windows' PowerShell | -| Windows | PnP | [147](#147) | Output a table with USB/PnP devices using Windows' PowerShell | -| Windows | Storage | [148](#148) | Output a table with the attached disk information using Windows' PowerShell | +| DB | Mongo | [26](#26) | List all records from a specific MongoDB database and collection from a remote Mongo database. | +| DB | SQLite | [27](#27) | Perform a query over a database using JDBC. | +| DB | SQLite | [28](#28) | Store the json result on a SQLite database table. | +| Diff | Envs | [29](#29) | Given two JSON files with environment variables performs a diff and returns a colored result with the corresponding differences | +| Diff | Lines | [30](#30) | Performing a diff between two long command lines to spot differences | +| Diff | Path | [31](#31) | Given two JSON files with the parsed PATH environment variable performs a diff and returns a colored result with the corresponding differences | +| Docker | Containers | [32](#32) | Output a table with the list of running containers. | +| Docker | Listing | [33](#33) | List all containers with the docker-compose project, service name, file, id, name, image, creation time, status, networks and ports. | +| Docker | Listing | [34](#34) | List all containers with their corresponding labels parsed and sorted. | +| Docker | Network | [35](#35) | Output a table with the docker networks info. | +| Docker | Registry | [36](#36) | List all a table of docker container images repository and corresponding tags of a private registry. | +| Docker | Registry | [37](#37) | List all the docker container image repositories of a private registry. | +| Docker | Registry | [38](#38) | List all the docker container image repository tags of a private registry. | +| Docker | Stats | [39](#39) | Output a table with the docker stats broken down for each value. | +| Docker | Storage | [40](#40) | Output a table with the docker volumes info. | +| ElasticSearch | Cluster | [41](#41) | Get an ElasticSearch/OpenSearch cluster nodes overview | +| ElasticSearch | Cluster | [42](#42) | Get an ElasticSearch/OpenSearch cluster per host data allocation | +| ElasticSearch | Cluster | [43](#43) | Get an ElasticSearch/OpenSearch cluster settings flat | +| ElasticSearch | Cluster | [44](#44) | Get an ElasticSearch/OpenSearch cluster settings non-flatted | +| ElasticSearch | Cluster | [45](#45) | Get an ElasticSearch/OpenSearch cluster stats per node | +| ElasticSearch | Cluster | [46](#46) | Get an overview of an ElasticSearch/OpenSearch cluster health | +| ElasticSearch | Indices | [47](#47) | Get an ElasticSearch/OpenSearch count per index | +| ElasticSearch | Indices | [48](#48) | Get an ElasticSearch/OpenSearch indices overview | +| ElasticSearch | Indices | [49](#49) | Get an ElasticSearch/OpenSearch settings for a specific index | +| GPU | Nvidia | [50](#50) | Builds a grid with two charts providing a visualization over a Nvidia GPU usage and the corresponding memory usage for a specific GPU_IDX (gpu index) | +| GPU | Nvidia | [51](#51) | Get current Nvidia per-gpu usage | +| Generic | Arrays | [52](#52) | Converting an array of strings into an array of maps | +| Generic | Avro | [53](#53) | Given an Avro data file outputs it's corresponding statistics | +| Generic | Avro | [54](#54) | Given an Avro data file outputs the correspoding schema | +| Generic | Avro | [55](#55) | Reads an Avro data file as input | +| Generic | Avro | [56](#56) | Write an Avro data file as an output | +| Generic | Base64 | [57](#57) | Encode/decode data (or text-like files) to/from gzip base64 representation for easier packing and transport. | +| Generic | Excel | [58](#58) | Building an Excel file with the AWS IPv4 and IPv6 ranges (1). | +| Generic | Excel | [59](#59) | Building an Excel file with the AWS IPv4 and IPv6 ranges (2). | +| Generic | Excel | [60](#60) | Building an Excel file with the AWS IPv4 and IPv6 ranges (3). | +| Generic | Excel | [61](#61) | Processes each json file in /some/data creating and updating the data.xlsx file with a sheet for each file. | +| Generic | Excel | [62](#62) | Store and retrieve data from an Excel spreadsheet | +| Generic | HTML | [63](#63) | Generate a HTML with table of emoticons/emojis by category, group, name, unicode and html code. | +| Generic | Hex | [64](#64) | Outputs an hexadecimal representation of the characters of the file provided allowing to adjust how many per line/row. | +| Generic | List files | [65](#65) | After listing all files and folders recursively producing a count table by file extension. | +| Generic | RSS | [66](#66) | Builds an HTML file with the current linked news titles, publication date and source from Google News RSS. | +| Generic | RSS | [67](#67) | Example of generating a HTML list of titles, links and publication dates from a RSS feed | +| Generic | RSS | [68](#68) | Parses the Slashdot's RSS feed news into a quick clickable HTML page in a browser | +| Generic | Template | [69](#69) | Given a meal name will search 'The Meal DB' site for the corresponding recipe and render a markdown HTML of the corresponding recipe. | +| Generic | Text | [70](#70) | Get a json with lyrics of a song. | +| Generic | Text | [71](#71) | Search a word in the English dictionary returning phonetic, meanings, synonyms, antonyms, etc. | +| GitHub | Releases | [72](#72) | Builds a table of GitHub project releases | +| GitHub | Releases | [73](#73) | Parses the latest GitHub project release markdown notes | +| Grid | Java | [74](#74) | Parses a Java hsperf data + the current rss java process memory into a looping grid. | +| Grid | Java | [75](#75) | Parses a Java hsperf data into a looping grid. | +| Grid | Kubernetes | [76](#76) | Displays a continuous updating grid with a line chart with the number of CPU throtlles and bursts recorded in the Linux cgroup cpu stats of a container running in Kubernetes and the source cpu.stats data | +| Grid | Mac | [77](#77) | Shows a grid with the Mac network metrics and 4 charts for in, out packets and in, out bytes | +| Grid | Mac | [78](#78) | Shows a grid with the Mac storage metrics and 4 charts for read, write IOPS and read, write bytes per second | +| Grid | Unix | [79](#79) | On an Unix/Linux system supporting 'ps' output formats %cpu and %mem, will output a chart with the percentage of cpu and memory usage of a provided pid (e.g. 12345) | +| JSON Schemas | Lists | [80](#80) | Get a list of JSON schemas from Schema Store catalog | +| Kubernetes | Containers | [81](#81) | Parse the Linux cgroup cpu stats on a container running in Kubernetes | +| Kubernetes | Kubectl | [82](#82) | Build an output table with Kubernetes pods with namespace, pod name, container name and corresponding resources using kubectl | +| Kubernetes | Kubectl | [83](#83) | Build an output table with Kubernetes pods with node, namespace, pod name, container name and corresponding resources using kubectl | +| Kubernetes | Kubectl | [84](#84) | Executes a recursive file list find command in a specific pod, namespace and path converting the result into a table. | +| Kubernetes | Kubectl | [85](#85) | Given the list of all Kubernetes objects will produce a list of objects per namespace, kind, apiVersiom, creation timestamp, name and owner. | +| Kubernetes | Kubectl | [86](#86) | List of Kubernetes CPU, memory and storage stats per node using kubectl | +| Kubernetes | Kubectl | [87](#87) | List of Kubernetes pods per namespace and kind using kubectl | +| Kubernetes | Kubectl | [88](#88) | Produces a list of pods' containers per namespace with the corresponding images and assigned nodes. | +| Kubernetes | PVC | [89](#89) | Produces a table with all Kubernetes persistent volume claims (PVCs) in use by pods. | +| Mac | Activity | [90](#90) | Uses the Mac terminal command 'last' output to build an activity table with user, tty, from, login-time and logout-time | +| Mac | Brew | [91](#91) | List all the packages and corresponding versions installed in a Mac by brew. | +| Mac | Info | [92](#92) | Parses the current Mac OS hardware information | +| Mac | Info | [93](#93) | Parses the current Mac OS overview information | +| Mac | Safari | [94](#94) | Get a list of all Mac OS Safari bookmarks into a CSV file. | +| Mac | Tunnelblink | [95](#95) | In a Mac OS with Tunnelblink, if you want to copy all your OpenVPN configurations into ovpn files. | +| Network | ASN | [96](#96) | Retrieve an IP to ASN list list and converts it to ndjson | +| Network | ASN | [97](#97) | Retrieve the list of ASN number and names from RIPE and transforms it to a CSV. | +| Network | Latency | [98](#98) | Given a host and a port will display a continuously updating line chart with network latency, in ms, between the current device and the target host and port | +| Ollama | List models | [99](#99) | Parses the list of models currently in an Ollama deployment | +| OpenAF | Channels | [100](#100) | Copy the json result of a command into an etcd database using OpenAF's channels | +| OpenAF | Channels | [101](#101) | Getting all data stored in an etcd database using OpenAF's channels | +| OpenAF | Channels | [102](#102) | Given a Prometheus database will query for a specific metric (go_memstats_alloc_bytes), during a defined period, every 5 seconds (step) will produce a static chart with the corresponding metric values. | +| OpenAF | Channels | [103](#103) | Perform a query to a metric & label, with a start and end time, to a Prometheus server using OpenAF's channels | +| OpenAF | Channels | [104](#104) | Retrieve all keys stores in a H2 MVStore file using OpenAF's channels | +| OpenAF | Channels | [105](#105) | Store and retrieve data from a Redis database | +| OpenAF | Channels | [106](#106) | Store and retrieve data from a RocksDB database | +| OpenAF | Channels | [107](#107) | Store the json results of a command into a H2 MVStore file using OpenAF's channels | +| OpenAF | Network | [108](#108) | List all MX (mail servers) network addresses from the current DNS server for a hostname using OpenAF | +| OpenAF | Network | [109](#109) | List all network addresses returned from the current DNS server for a hostname using OpenAF | +| OpenAF | OS | [110](#110) | Current OS information visible to OpenAF | +| OpenAF | OS | [111](#111) | Using OpenAF parse the current environment variables | +| OpenAF | OpenVPN | [112](#112) | Using OpenAF code to perform a more complex parsing of the OpenVPN status data running on an OpenVPN container (nmaguiar/openvpn) called 'openvpn' | +| OpenAF | SFTP | [113](#113) | Generates a file list with filepath, size, permissions, create and last modified time from a SFTP connection with user and password | +| OpenAF | SFTP | [114](#114) | Generates a file list with filepath, size, permissions, create and last modified time from a SFTP connection with user, private key and password | +| OpenAF | TLS | [115](#115) | List the TLS certificates of a target host with a sorted alternative names using OpenAF | +| OpenAF | oJob.io | [116](#116) | Parses ojob.io/news results into a clickable news title HMTL page. | +| OpenAF | oJob.io | [117](#117) | Retrieves the list of oJob.io's jobs and filters which start by 'ojob.io/news' to display them in a rectangle | +| OpenAF | oPacks | [118](#118) | Listing all currently accessible OpenAF's oPacks | +| OpenAF | oafp | [119](#119) | Filter the OpenAF's oafp examples list by a specific word in the description | +| OpenAF | oafp | [120](#120) | List the OpenAF's oafp examples by category, sub-category and description | +| OpenVPN | List | [121](#121) | When using the container nmaguiar/openvpn it's possible to convert the list of all clients order by expiration/end date | +| Unix | Activity | [122](#122) | Uses the Linux command 'last' output to build a table with user, tty, from and period of activity | +| Unix | Alpine | [123](#123) | List all installed packages in an Alpine system | +| Unix | Compute | [124](#124) | Parses the Linux /proc/cpuinfo into an array | +| Unix | Debian/Ubuntu | [125](#125) | List all installed packages in a Debian/Ubuntu system | +| Unix | Envs | [126](#126) | Converts the Linux envs command result into a table of environment variables and corresponding values | +| Unix | Files | [127](#127) | Converting the Linux's /etc/os-release to SQL insert statements. | +| Unix | Files | [128](#128) | Converting the Unix's syslog into a json output. | +| Unix | Files | [129](#129) | Executes a recursive file list find command converting the result into a table. | +| Unix | Files | [130](#130) | Parses the Linux /etc/passwd to a table order by uid and gid. | +| Unix | Generic | [131](#131) | Creates, in unix, a data.ndjson file where each record is formatted from json files in /some/data | +| Unix | Memory map | [132](#132) | Given an Unix process will output a table with process's components memory address, size in bytes, permissions and owner | +| Unix | Network | [133](#133) | Loop over the current Linux active network connections | +| Unix | Network | [134](#134) | Parse the Linux 'arp' command output | +| Unix | Network | [135](#135) | Parse the Linux 'ip tcp_metrics' command | +| Unix | Network | [136](#136) | Parse the result of the Linux route command | +| Unix | OpenSuse | [137](#137) | List all installed packages in an OpenSuse system or zypper based system | +| Unix | RedHat | [138](#138) | List all installed packages in a RedHat system or rpm based system (use rpm --querytags to list all fields available) | +| Unix | Storage | [139](#139) | Converting the Unix's df output | +| Unix | Storage | [140](#140) | Parses the result of the Unix ls command | +| Unix | SystemCtl | [141](#141) | Converting the Unix's systemctl list-timers | +| Unix | SystemCtl | [142](#142) | Converting the Unix's systemctl list-units | +| Unix | SystemCtl | [143](#143) | Converting the Unix's systemctl list-units into an overview table | +| Unix | UBI | [144](#144) | List all installed packages in an UBI system | +| Unix | named | [145](#145) | Converts a Linux's named log, for client queries, into a CSV | +| Windows | Network | [146](#146) | Output a table with the current route table using Windows' PowerShell | +| Windows | Network | [147](#147) | Output a table with the list of network interfaces using Windows' PowerShell | +| Windows | PnP | [148](#148) | Output a table with USB/PnP devices using Windows' PowerShell | +| Windows | Storage | [149](#149) | Output a table with the attached disk information using Windows' PowerShell | ## 📗 Examples @@ -392,6 +393,15 @@ oaf -c "\$o(listFilesRecursive('.'),{__format:'json'})" | oafp out=db dbjdbc="jd --- ##### 26 +### 📖 DB | Mongo +List all records from a specific MongoDB database and collection from a remote Mongo database. +```bash +# opack install mongo +oafp libs="@Mongo/mongo.js" in=ch inch="(type: mongo, options: (database: default, collection: collection, url: 'mongodb://a.server:27017'))" inchall=true path="[].delete(@,'_id')" data="()" +``` +--- + +##### 27 ### 📖 DB | SQLite Perform a query over a database using JDBC. ```bash @@ -400,7 +410,7 @@ echo "select * from data" | oafp in=db indbjdbc="jdbc:sqlite:data.db" indbtable= ``` --- -##### 27 +##### 28 ### 📖 DB | SQLite Store the json result on a SQLite database table. ```bash @@ -409,7 +419,7 @@ oaf -c "\$o(listFilesRecursive('.'),{__format:'json'})" | oafp out=db dbjdbc="jd ``` --- -##### 28 +##### 29 ### 📖 Diff | Envs Given two JSON files with environment variables performs a diff and returns a colored result with the corresponding differences ```bash @@ -420,7 +430,7 @@ oafp in=oafp data="[(file: data1.json)|(file: data2.json)]" diff="(a:'[0]',b:'[1 ``` --- -##### 29 +##### 30 ### 📖 Diff | Lines Performing a diff between two long command lines to spot differences ```bash @@ -435,7 +445,7 @@ after: URL="http://localhost:9090" && METRIC="go_memstats_alloc_bytes" && TYPE=" ``` --- -##### 30 +##### 31 ### 📖 Diff | Path Given two JSON files with the parsed PATH environment variable performs a diff and returns a colored result with the corresponding differences ```bash @@ -446,7 +456,7 @@ oafp in=oafp data="[(file: data1.json)|(file: data2.json)]" diff="(a:'sort([0])' ``` --- -##### 31 +##### 32 ### 📖 Docker | Containers Output a table with the list of running containers. ```bash @@ -454,7 +464,7 @@ oafp cmd="docker ps --format json" input=ndjson ndjsonjoin=true path="[].{id:ID, ``` --- -##### 32 +##### 33 ### 📖 Docker | Listing List all containers with the docker-compose project, service name, file, id, name, image, creation time, status, networks and ports. ```bash @@ -462,7 +472,7 @@ docker ps -a --format=json | oafp in=ndjson ndjsonjoin=true out=ctree path="[].i ``` --- -##### 33 +##### 34 ### 📖 Docker | Listing List all containers with their corresponding labels parsed and sorted. ```bash @@ -470,7 +480,7 @@ docker ps -a --format=json | oafp in=ndjson ndjsonjoin=true out=ctree path="[].i ``` --- -##### 34 +##### 35 ### 📖 Docker | Network Output a table with the docker networks info. ```bash @@ -478,7 +488,7 @@ docker network ls --format json | oafp in=ndjson ndjsonjoin=true out=ctable ``` --- -##### 35 +##### 36 ### 📖 Docker | Registry List all a table of docker container images repository and corresponding tags of a private registry. ```bash @@ -488,7 +498,7 @@ oafp libs=dockerregistry in=registryrepos data="()" inregistryurl=http://localho ``` --- -##### 36 +##### 37 ### 📖 Docker | Registry List all the docker container image repositories of a private registry. ```bash @@ -498,7 +508,7 @@ oafp libs=dockerregistry data="()" in=registryrepos inregistryurl=http://localho ``` --- -##### 37 +##### 38 ### 📖 Docker | Registry List all the docker container image repository tags of a private registry. ```bash @@ -508,7 +518,7 @@ oafp libs=dockerregistry data="library/nginx" in=registrytags inregistryurl=http ``` --- -##### 38 +##### 39 ### 📖 Docker | Stats Output a table with the docker stats broken down for each value. ```bash @@ -516,7 +526,7 @@ oafp cmd="docker stats --no-stream" in=lines linesvisual=true linesjoin=true out ``` --- -##### 39 +##### 40 ### 📖 Docker | Storage Output a table with the docker volumes info. ```bash @@ -524,7 +534,7 @@ docker volume ls --format json | oafp in=ndjson ndjsonjoin=true out=ctable ``` --- -##### 40 +##### 41 ### 📖 ElasticSearch | Cluster Get an ElasticSearch/OpenSearch cluster nodes overview ```bash @@ -534,7 +544,7 @@ curl -s "$ES_URL/_cat/nodes?format=json" $ES_EXTRA | oafp sql="select * order by ``` --- -##### 41 +##### 42 ### 📖 ElasticSearch | Cluster Get an ElasticSearch/OpenSearch cluster per host data allocation ```bash @@ -544,7 +554,7 @@ curl -s "$ES_URL/_cat/allocation?format=json&bytes=b" $ES_EXTRA | oafp sql="sele ``` --- -##### 42 +##### 43 ### 📖 ElasticSearch | Cluster Get an ElasticSearch/OpenSearch cluster settings flat ```bash @@ -554,7 +564,7 @@ curl -s "$ES_URL/_cluster/settings?include_defaults=true&flat_settings=true" $ES ``` --- -##### 43 +##### 44 ### 📖 ElasticSearch | Cluster Get an ElasticSearch/OpenSearch cluster settings non-flatted ```bash @@ -564,7 +574,7 @@ curl -s "$ES_URL/_cluster/settings?include_defaults=true" $ES_EXTRA | oafp out=c ``` --- -##### 44 +##### 45 ### 📖 ElasticSearch | Cluster Get an ElasticSearch/OpenSearch cluster stats per node ```bash @@ -574,7 +584,7 @@ curl -s "$ES_URL/_nodes/stats/indices/search" $ES_EXTRA | oafp out=ctree ``` --- -##### 45 +##### 46 ### 📖 ElasticSearch | Cluster Get an overview of an ElasticSearch/OpenSearch cluster health ```bash @@ -584,7 +594,7 @@ curl -s "$ES_URL/_cat/health?format=json" $ES_EXTRA | oafp out=ctable ``` --- -##### 46 +##### 47 ### 📖 ElasticSearch | Indices Get an ElasticSearch/OpenSearch count per index ```bash @@ -594,7 +604,7 @@ curl -s "$ES_URL/kibana_sample_data_flights/_count" $ES_EXTRA | oafp ``` --- -##### 47 +##### 48 ### 📖 ElasticSearch | Indices Get an ElasticSearch/OpenSearch indices overview ```bash @@ -604,7 +614,7 @@ curl -s "$ES_URL/_cat/indices?format=json&bytes=b" $ES_EXTRA | oafp sql="select ``` --- -##### 48 +##### 49 ### 📖 ElasticSearch | Indices Get an ElasticSearch/OpenSearch settings for a specific index ```bash @@ -614,7 +624,7 @@ curl -s "$ES_URL/kibana_sample_data_flights/_settings" $ES_EXTRA | oafp out=ctre ``` --- -##### 49 +##### 50 ### 📖 GPU | Nvidia Builds a grid with two charts providing a visualization over a Nvidia GPU usage and the corresponding memory usage for a specific GPU_IDX (gpu index) ```bash @@ -622,7 +632,7 @@ GPU_IDX=0 &&oafp cmd="nvidia-smi --query-gpu=index,name,memory.total,memory.used ``` --- -##### 50 +##### 51 ### 📖 GPU | Nvidia Get current Nvidia per-gpu usage ```bash @@ -630,7 +640,7 @@ nvidia-smi --query-gpu=index,name,memory.total,memory.used,memory.free,utilizati ``` --- -##### 51 +##### 52 ### 📖 Generic | Arrays Converting an array of strings into an array of maps ```bash @@ -638,7 +648,7 @@ oafp -v path="java.params[].insert(from_json('{}'), 'param', @).insert(@, 'len', ``` --- -##### 52 +##### 53 ### 📖 Generic | Avro Given an Avro data file outputs it's corresponding statistics ```bash @@ -647,7 +657,7 @@ oafp libs=avro data.avro inavrostats=true ``` --- -##### 53 +##### 54 ### 📖 Generic | Avro Given an Avro data file outputs the correspoding schema ```bash @@ -656,7 +666,7 @@ oafp libs=avro data.avro inavroschema=true ``` --- -##### 54 +##### 55 ### 📖 Generic | Avro Reads an Avro data file as input ```bash @@ -665,7 +675,7 @@ oafp data.avro libs=avro out=ctable ``` --- -##### 55 +##### 56 ### 📖 Generic | Avro Write an Avro data file as an output ```bash @@ -674,7 +684,7 @@ oafp data.json libs=avro out=avro avrofile=data.avro ``` --- -##### 56 +##### 57 ### 📖 Generic | Base64 Encode/decode data (or text-like files) to/from gzip base64 representation for easier packing and transport. ```bash @@ -685,7 +695,7 @@ oafp data.gb64 in=gb64json out=json > data.json ``` --- -##### 57 +##### 58 ### 📖 Generic | Excel Building an Excel file with the AWS IPv4 and IPv6 ranges (1). ```bash @@ -693,7 +703,7 @@ curl https://ip-ranges.amazonaws.com/ip-ranges.json > ip-ranges.json ``` --- -##### 58 +##### 59 ### 📖 Generic | Excel Building an Excel file with the AWS IPv4 and IPv6 ranges (2). ```bash @@ -701,7 +711,7 @@ oafp ip-ranges.json path=prefixes out=xls xlsfile=aws-ip-ranges.xlsx xlssheet=ip ``` --- -##### 59 +##### 60 ### 📖 Generic | Excel Building an Excel file with the AWS IPv4 and IPv6 ranges (3). ```bash @@ -709,7 +719,7 @@ oafp ip-ranges.json path=ipv6_prefixes out=xls xlsfile=aws-ip-ranges.xlsx xlsshe ``` --- -##### 60 +##### 61 ### 📖 Generic | Excel Processes each json file in /some/data creating and updating the data.xlsx file with a sheet for each file. ```bash @@ -717,7 +727,7 @@ find /some/data -name "*.json" | xargs -I '{}' /bin/sh -c 'oafp file={} output=x ``` --- -##### 61 +##### 62 ### 📖 Generic | Excel Store and retrieve data from an Excel spreadsheet ```bash @@ -728,7 +738,7 @@ oafp in=xls file=data.xlsx xlscol=A xlsrow=1 out=pjson ``` --- -##### 62 +##### 63 ### 📖 Generic | HTML Generate a HTML with table of emoticons/emojis by category, group, name, unicode and html code. ```bash @@ -736,7 +746,7 @@ oafp url="https://emojihub.yurace.pro/api/all" path="[].{category:category,group ``` --- -##### 63 +##### 64 ### 📖 Generic | Hex Outputs an hexadecimal representation of the characters of the file provided allowing to adjust how many per line/row. ```bash @@ -744,7 +754,7 @@ oafp some.file in=rawhex inrawhexline=15 out=ctable ``` --- -##### 64 +##### 65 ### 📖 Generic | List files After listing all files and folders recursively producing a count table by file extension. ```bash @@ -752,7 +762,7 @@ FPATH="git/ojob.io" && oafp in=ls lsrecursive=true data="$FPATH" path="[].insert ``` --- -##### 65 +##### 66 ### 📖 Generic | RSS Builds an HTML file with the current linked news titles, publication date and source from Google News RSS. ```bash @@ -760,7 +770,7 @@ RSS="https://news.google.com/rss" && oafp url="$RSS" path="rss.channel.item[].{t ``` --- -##### 66 +##### 67 ### 📖 Generic | RSS Example of generating a HTML list of titles, links and publication dates from a RSS feed ```bash @@ -768,7 +778,7 @@ oafp url="https://blog.google/rss" path="rss.channel.item" sql="select title, li ``` --- -##### 67 +##### 68 ### 📖 Generic | RSS Parses the Slashdot's RSS feed news into a quick clickable HTML page in a browser ```bash @@ -776,7 +786,7 @@ RSS="http://rss.slashdot.org/Slashdot/slashdot" && oafp url="$RSS" path="RDF.ite ``` --- -##### 68 +##### 69 ### 📖 Generic | Template Given a meal name will search 'The Meal DB' site for the corresponding recipe and render a markdown HTML of the corresponding recipe. ```bash @@ -784,7 +794,7 @@ MEAL="Pizza" && echo "# {{strMeal}}\n> {{strCategory}} | {{strArea}}\n data.ndjson ``` --- -##### 131 +##### 132 ### 📖 Unix | Memory map Given an Unix process will output a table with process's components memory address, size in bytes, permissions and owner ```bash @@ -1304,7 +1314,7 @@ pmap 12345 | sed '1d;$d' | oafp in=lines linesjoin=true path="[].split_re(@, '\\ ``` --- -##### 132 +##### 133 ### 📖 Unix | Network Loop over the current Linux active network connections ```bash @@ -1312,7 +1322,7 @@ oafp cmd="netstat -tun | sed \"1d\"" in=lines linesvisual=true linesjoin=true li ``` --- -##### 133 +##### 134 ### 📖 Unix | Network Parse the Linux 'arp' command output ```bash @@ -1320,7 +1330,7 @@ arp | oafp in=lines linesvisual=true linesjoin=true out=ctable ``` --- -##### 134 +##### 135 ### 📖 Unix | Network Parse the Linux 'ip tcp_metrics' command ```bash @@ -1328,7 +1338,7 @@ ip tcp_metrics | sed 's/^/target: /g' | sed 's/$/\n\n---\n/g' | sed 's/ \([a-z]* ``` --- -##### 135 +##### 136 ### 📖 Unix | Network Parse the result of the Linux route command ```bash @@ -1336,7 +1346,7 @@ route | sed "1d" | oafp in=lines linesjoin=true linesvisual=true linesvisualsepr ``` --- -##### 136 +##### 137 ### 📖 Unix | OpenSuse List all installed packages in an OpenSuse system or zypper based system ```bash @@ -1344,7 +1354,7 @@ zypper se -is | egrep "^i" | oafp in=lines linesjoin=true path="[].split(@,'|'). ``` --- -##### 137 +##### 138 ### 📖 Unix | RedHat List all installed packages in a RedHat system or rpm based system (use rpm --querytags to list all fields available) ```bash @@ -1352,7 +1362,7 @@ rpm -qa --qf "%{NAME}|%{VERSION}|%{PACKAGER}|%{VENDOR}|%{ARCH}\n" | oafp in=line ``` --- -##### 138 +##### 139 ### 📖 Unix | Storage Converting the Unix's df output ```bash @@ -1360,7 +1370,7 @@ df --output=target,fstype,size,used,avail,pcent | tail -n +2 | oafp in=lines lin ``` --- -##### 139 +##### 140 ### 📖 Unix | Storage Parses the result of the Unix ls command ```bash @@ -1368,7 +1378,7 @@ ls -lad --time-style="+%Y-%m-%d %H:%M" * | oafp in=lines path="map(&split_re(@,' ``` --- -##### 140 +##### 141 ### 📖 Unix | SystemCtl Converting the Unix's systemctl list-timers ```bash @@ -1376,7 +1386,7 @@ systemctl list-timers | head -n -3 | oafp in=lines linesvisual=true linesjoin=tr ``` --- -##### 141 +##### 142 ### 📖 Unix | SystemCtl Converting the Unix's systemctl list-units ```bash @@ -1384,7 +1394,7 @@ systemctl list-units | head -n -6 | oafp in=lines linesvisual=true linesjoin=tru ``` --- -##### 142 +##### 143 ### 📖 Unix | SystemCtl Converting the Unix's systemctl list-units into an overview table ```bash @@ -1392,7 +1402,7 @@ systemctl list-units | head -n -6 | oafp in=lines linesvisual=true linesjoin=tru ``` --- -##### 143 +##### 144 ### 📖 Unix | UBI List all installed packages in an UBI system ```bash @@ -1400,7 +1410,7 @@ microdnf repoquery --setopt=cachedir=/tmp --installed | oafp in=lines linesjoin= ``` --- -##### 144 +##### 145 ### 📖 Unix | named Converts a Linux's named log, for client queries, into a CSV ```bash @@ -1408,7 +1418,7 @@ cat named.log | oafp in=lines linesjoin=true path="[?contains(@,' client ')==\`t ``` --- -##### 145 +##### 146 ### 📖 Windows | Network Output a table with the current route table using Windows' PowerShell ```bash @@ -1416,7 +1426,7 @@ Get-NetRoute | ConvertTo-Json | .\oafp.bat path="[].{destination:DestinationPref ``` --- -##### 146 +##### 147 ### 📖 Windows | Network Output a table with the list of network interfaces using Windows' PowerShell ```bash @@ -1424,7 +1434,7 @@ Get-NetIPAddress | ConvertTo-Json | .\oafp.bat path="[].{ipAddress:IPAddress,pre ``` --- -##### 147 +##### 148 ### 📖 Windows | PnP Output a table with USB/PnP devices using Windows' PowerShell ```bash @@ -1432,7 +1442,7 @@ Get-PnpDevice -PresentOnly | ConvertTo-Csv -NoTypeInformation | .\oafp.bat in=cs ``` --- -##### 148 +##### 149 ### 📖 Windows | Storage Output a table with the attached disk information using Windows' PowerShell ```bash