provides an API, Scheduler, UI, controller and a KV store, all information and state is stored in -> etcd
control plane
| input { | |
| jdbc { | |
| jdbc_driver_library => "/usr/local/logstash-5.2.1/plugins/sqlite-jdbc-3.16.1.jar" | |
| jdbc_driver_class => "org.sqlite.jdbc" | |
| jdbc_connection_string => "jdbc:sqlite:/Library/Server/Caching/Logs/Metrics.sqlite" | |
| jdbc_user => "" | |
| schedule => "* * * * *" | |
| statement => 'SELECT * FROM statsData WHERE metricname LIKE "bytes.%.toclients" OR metricname LIKE "bytes.%.topeers"' | |
| tracking_column => "entryindex" | |
| use_column_value => true |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>Label</key> | |
| <string>com.org.logstash</string> | |
| <key>ProgramArguments</key> | |
| <array> | |
| <string>/usr/local/logstash-5.2.1/bin/logstash</string> | |
| <string>-f</string> |
| # Option 1 | |
| # Get the data from the ManagedClient section of the System Profiler | |
| system_profiler SPManagedClientDataType | |
| # Additional - you can also provide the -xml flag to get the output in xml | |
| system_profiler -xml SPManagedClientDataType | |
| # Option 2 | |
| # use mcxquery | |
| mcxquery |
| #!/usr/bin/python | |
| ''' | |
| Author: Calum Hunter | |
| Date: April 16 2018 | |
| Version: 1.0 | |
| This script will get the current UserShell | |
| value set in the users record in /Local/Default |
| #!/usr/bin/expect | |
| expect "connecting" | |
| send "yes\r" | |
| exit 0 |
| #!/bin/bash | |
| ################################################################################# | |
| # # | |
| # Author: Calum Hunter # | |
| # Date: 22-08-2016 # | |
| # Version: 1.0 # | |
| # Purpose: Install check script for the AD Bind Package. # | |
| # This script checks to see if we are bound to AD and if our binding # | |
| # is working. If we are not bound, or our binding is broken. # |
| ## Download the get pip script | |
| $ curl -o get_pip.py https://bootstrap.pypa.io/get-pip.py | |
| ## Switch to root user | |
| $ sudo su | |
| ## Run the script as root | |
| # ./get_pip.py | |
| ## Switch back to regular user and install modules with pip |
| #!/bin/bash | |
| # Get latest AMI codes for CentOS 7 from AWS | |
| region="ap-southeast-2" | |
| product_code="aw0evgkw8e5c1q413zgy5pjce" | |
| aws ec2 describe-images \ | |
| --region "$region" \ | |
| --owners aws-marketplace \ |
| # define the network interfaces in a count block for the vm's you want to assign them to | |
| resource "azurerm_network_interface" "network-interface" { | |
| name = "interface-number-${count.index}" | |
| count = 3 | |
| # ... | |
| } | |
| # The above resource will generate three network interfaces |