Skip to content

Instantly share code, notes, and snippets.

View Craigson's full-sized avatar

Craig Pickard Craigson

View GitHub Profile
@Craigson
Craigson / services_and_roles.yaml
Last active January 23, 2021 18:35
Examining the playbook and roles for deploying Kibana and Nginx
deploy_services.yaml
# Deploy Kibana and Nginx
- name: Deploy Kibana & Nginx
hosts: kibana-nginx
vars:
subnet: 172.22.0.0/24
agent_name: "log_3_kibana_nginx"
agent_tags: "log3,logger"
agent_provider: "1" # <=== replace this
@Craigson
Craigson / get-endpoints-output
Created January 23, 2021 18:16
Result of get-endpoints command for Log3
+----------+---------------------+----------------+-----------------------+----------+--------+--------------+
| Agent ID | Name | Public IP | Provider | Location | Online | Tags |
+----------+---------------------+----------------+-----------------------+----------+--------+--------------+
| 812 | log_3_elasticsearch | *.*.*.* | Google Cloud Platform | | True | log3 |
| 813 | log_3_kibana_nginx | *.*.*.* | Amazon Web Services | Ashburn | True | log3, logger |
| 811 | log_3_fluentd | *.*.*.* | DigitalOcean | Clifton | True | log3, logger |
+----------+---------------------+----------------+-----------------------+----------+--------+--------------+
@Craigson
Craigson / syntropyhosts
Created January 23, 2021 18:09
Sample syntropyhosts file for Log3
[all:vars]
ansible_ssh_private_key_file=<pem_file_location>
[fluentd]
fluentd ansible_host=<fluentd_vm_ip> ansible_connection=ssh ansible_user=<fluentd_user>
[elasticsearch]
elasticsearch ansible_host=<elasticsearch_vm_ip> ansible_connection=ssh ansible_user=<elasticsearch_user>
[kibana]
@Craigson
Craigson / gist:164e537948ea4f81f01186ac93b168e1
Last active January 16, 2021 03:27
syntropy NAC template for an MQTT network
name: MQT4
state: present
topology: p2m
connections:
mqt_4_broker:
state: present
type: endpoint
services:
- mosquitto
connect_to:
@Craigson
Craigson / check-endpoints
Created January 15, 2021 04:38
Output from the syntropyctl get-endpoints command
+----------+------------------+----------------+-----------------------+----------+--------+------+
| Agent ID | Name | Public IP | Provider | Location | Online | Tags |
+----------+------------------+----------------+-----------------------+----------+--------+------+
| 555 | mqt_4_publisher | *.*.*.* | Google Cloud Platform | | True | mqtt |
| 556 | mqt_4_subscriber | *.*.*.* | Amazon Web Services | Ashburn | True | mqtt |
| 557 | mqt_4_broker | *.*.*.* | DigitalOcean | Clifton | True | mqtt |
+----------+------------------+----------------+-----------------------+----------+--------+------+
@Craigson
Craigson / get-networks.json
Created January 13, 2021 00:02
output of syntropyctl get-networks cmd
[
{
"network_id": 266,
"organization_id": null,
"user_id": 294,
"agent_gateway_id": null,
"network_key": "dw1DsYshImp9jH4Gpn4dij2nPhDfyrfs",
"network_type": "POINT_TO_POINT",
"network_name": "MQT3",
"network_disable_sdn_connections": true,
@Craigson
Craigson / create-connections.json
Created January 12, 2021 23:59
out from the syntropyctl create-connections command
[
{
"agent_connection_id": 26172,
"agent_1_id": 555,
"agent_interface_1_id": 2544,
"agent_2_id": 557,
"agent_interface_2_id": 2545,
"network_id": 266,
"agent_connection_created_at": "2021-01-12T04:19:01.358",
"agent_connection_updated_at": "2021-01-12T04:19:01.358",
@Craigson
Craigson / enable-all-services
Created January 12, 2021 23:22
output from running syntropyctl --enable-all-services
Found 1 endpoints.
Nothing to do for service configuration.
+----------+--------------+----------------+--------------+----------+--------+------+-------------+
| Agent ID | Name | Public IP | Provider | Location | Online | Tags | Services |
+----------+--------------+----------------+--------------+----------+--------+------+-------------+
| 569 | mqt_3_broker | *.*.*.* | DigitalOcean | Clifton | True | mqtt | mosquitto^^ |
+----------+--------------+----------------+--------------+----------+--------+------+-------------+
@Craigson
Craigson / MQT3.yaml
Created January 12, 2021 23:05
Network template for use with Syntropy's NAC utility
name: MQT3
state: present
topology: p2m
connections:
mqt_3_broker:
connect_to:
mqt_3_publisher:
services:
- nodejs-publisher
type: endpoint
@Craigson
Craigson / get-endpoints-result.json
Created January 12, 2021 22:49
result of get-endpoints using syntropyctl
[
{
"agent_id": 555,
"agent_public_ipv4": "redacted",
"agent_location_city": "",
"agent_name": "mqt_2_publisher",
"agent_status": "OK",
"agent_version": "0.0.70",
"agent_is_online": true,
"agent_locked_fields": {