This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Find all suspicious long loops of transactions | |
Show the graph and json results | |
Scroll to bottom of graph results and click "GraphViewer" to see results in Graph Viewer */ | |
WITH transaction, account | |
FOR suspicous_account IN account | |
FOR acct, tx, path IN 5..10 OUTBOUND suspicous_account._id GRAPH 'fraud-detection' PRUNE tx._to == suspicous_account._id | |
FILTER tx._to == suspicous_account._id | |
RETURN path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Import Flux date package: https://docs.influxdata.com/influxdb/v2.0/reference/flux/stdlib/date/ | |
import "date" | |
// Import Flux dictionary package: https://docs.influxdata.com/influxdb/v2.0/reference/flux/stdlib/dict/ | |
import "dict" | |
bucket = "mybucket" | |
// Work with data collected in the past 5 minutes | |
start = -5m | |
stop = now() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// subDuration explained at: https://docs.influxdata.com/influxdb/v2.0/reference/flux/stdlib/experimental/subduration/ | |
// date.truncate explained at: https://docs.influxdata.com/influxdb/v2.0/reference/flux/stdlib/date/truncate/ | |
import "date" | |
import "csv" | |
import "experimental" | |
csvData = " | |
#datatype,string,long,dateTime:RFC3339,string,string,double | |
#group,false,false,false,false,false,false | |
#default,,,,,, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
snmp_trap,mib=NET-SNMP-AGENT-MIB,name=nsNotifyShutdown,oid=.1.3.6.1.4.1.8072.4.0.2,source=192.168.122.102,version=2c sysUpTimeInstance=26410i,snmpTrapEnterprise.0="netSnmpNotificationPrefix" 1578509036440568977 | |
snmp_trap,agent_address=192.168.122.102,mib=NET-SNMP-AGENT-MIB,name=nsNotifyShutdown,oid=.1.3.6.1.4.1.8072.4.0.2,source=192.168.122.102,version=1 sysUpTimeInstance=26410i 1578509036256357640 | |
snmp_trap,mib=SNMPv2-MIB,name=coldStart,oid=.1.3.6.1.6.3.1.1.5.1,source=192.168.122.102,version=2c sysUpTimeInstance=1i,snmpTrapEnterprise.0="linux" 1578509037022973807 | |
snmp_trap,agent_address=192.168.122.102,mib=SNMPv2-MIB,name=coldStart,oid=.1.3.6.1.6.3.1.1.5.1,source=192.168.122.102,version=1 sysUpTimeInstance=1i 1578509036875841715 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void loginTest() { | |
//Open browser | |
driver.get("http://localhost:8000/loginBefore.html"); | |
//Click on the Login button | |
driver.findElement(By.id("log-in")).click(); | |
//Start the test | |
eyes.open(driver, "Login App", "Login Page Test", new RectangleSize(800, 800)); | |
//Take a screenshot so AI can analyze (and ignore large displacements) | |
eyes.checkWindow("Login Window"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void loginLegacyTest() { | |
//Open browser | |
driver.get("http://localhost:8000/loginBefore.html"); | |
//Click on the Login button | |
driver.findElement(By.id("log-in")).click(); | |
//Assert the error text | |
assertEquals("Please enter username and password",driver.findElement(By.id("alert")).getText()); | |
//Assert if username field exists | |
assertTrue((driver.findElement(By.id("username")) instanceof WebElement)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Telegraf Configuration | |
# | |
# Telegraf is entirely plugin driven. All metrics are gathered from the | |
# declared inputs, and sent to the declared outputs. | |
# | |
# Plugins must be declared in here to be active. | |
# To deactivate a plugin, comment out the name and any variables. | |
# | |
# Use 'telegraf -config telegraf.conf -test' to see what metrics a config | |
# file would generate. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Hello world |