This commit is contained in:
geek 2018-07-03 16:25:26 +09:00
parent 2306e56e9b
commit 9c92a9b2b3
3 changed files with 2 additions and 50 deletions

View File

@ -1,25 +0,0 @@
{
"configID" : "112103115113108",
"target" : {
"connection" : {
"ip" : "192.168.1.50",
"port" : "5432",
"ssl" : false,
"portType" : "tcp"
},
"auth" : {
},
"meta": {
}
},
"schedule" : {
"interval" : "3"
},
"crawler" : {
"name":"POSTGRESQL_HEALTH",
"container":"NETWORK"
},
"items" : [
]
}

View File

@ -1,24 +0,0 @@
{
"configID" : "115115104",
"target" : {
"connection" : {
"ip" : "192.168.1.10",
"port" : "22",
"ssl" : false,
"portType" : "tcp"
},
"auth" : {
},
"meta": {
}
},
"schedule" : {
"interval" : "7"
},
"crawler" : {
"name":"SSH_HEALTH",
"container":"NETWORK"
},
"items" : [
]
}

View File

@ -9,7 +9,8 @@ func TestSensorService_AddSensor(t *testing.T) {
config := "pT1QAThXECRfY+Vqe0PpaDrI5TlJ+Psf0AyM5JWiHlHHEr0oZsq8z5L01BnXV4LDHtMXGB0wDb2+L+4SDxk/zM57b7dGHt76ibmZ/R6jPXF8EZYgORbNcyy+m60sesk8fK23unH4Wc1Gqf5ekxTyYjupQ6ZSQbmdFk/WJM3iYy20G8JN3gsHHZtWVCDRVzhQU8sAg+UQ4voSlN3hWajAN8sZFL0HDSba7CjDX3rp9Z7K7VoZCkBsti9b7Z/WhFjHV23zoO786ZhKc8M8lYa69eCgcDDX4zYGJ5RUHnzLFwYkZ6GAoVX0NM8nCA8+yk59CbEcWS1qjR9Xv2C32PuZq8oWOhVW1xiXQDBD1hhAv+3c+m4gZmpHZQ==" config := "pT1QAThXECRfY+Vqe0PpaDrI5TlJ+Psf0AyM5JWiHlHHEr0oZsq8z5L01BnXV4LDHtMXGB0wDb2+L+4SDxk/zM57b7dGHt76ibmZ/R6jPXF8EZYgORbNcyy+m60sesk8fK23unH4Wc1Gqf5ekxTyYjupQ6ZSQbmdFk/WJM3iYy20G8JN3gsHHZtWVCDRVzhQU8sAg+UQ4voSlN3hWajAN8sZFL0HDSba7CjDX3rp9Z7K7VoZCkBsti9b7Z/WhFjHV23zoO786ZhKc8M8lYa69eCgcDDX4zYGJ5RUHnzLFwYkZ6GAoVX0NM8nCA8+yk59CbEcWS1qjR9Xv2C32PuZq8oWOhVW1xiXQDBD1hhAv+3c+m4gZmpHZQ=="
s := &SensorService{} s := &SensorService{}
s.InitService() sc := &SensorConfigService{}
sc.InitService()
err := s.AddSensor(config) err := s.AddSensor(config)
if nil != err { if nil != err {