example

package
v0.0.0-...-9e7e4f5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2019 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Overview

This is an example module. It doesn't do anything. It only serves as

a template for writing modules. If you run it, it will return a JSON struct with the hostname and IPs of the current endpoint. If you add flag `-p`, it will pretty print the results.

$ ./bin/linux/amd64/mig-agent-latest -p -m example <<< '{"class":"parameters", "parameters":{"gethostname": true, "getaddresses": true, "lookuphost": ["www.google.com"]}}'
[info] using builtin conf
hostname is fedbox2.jaffa.linuxwall.info
address is 172.21.0.3/20
address is fe80::8e70:5aff:fec8:be50/64
lookedup host www.google.com has IP 74.125.196.106
lookedup host www.google.com has IP 74.125.196.99
lookedup host www.google.com has IP 74.125.196.104
lookedup host www.google.com has IP 74.125.196.103
lookedup host www.google.com has IP 74.125.196.105
lookedup host www.google.com has IP 74.125.196.147
lookedup host www.google.com has IP 2607:f8b0:4002:c07::69
stat: 3 stuff found

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL