Forum Discussion
So, Server1, Server2, Server3, Server4 and Server5 already added as devices in Logicmonitor.
I've created the Datasource, under --> In Applies to field defines which devices will be associated with this DataSource "I Should need to add Server1,2,3,4,...", right?
And then I've made this groovy script:
######################################################
import com.santaba.agent.groovyapi.expect.Expect;
import com.santaba.agent.groovyapi.snmp.Snmp;
import com.santaba.agent.groovyapi.jmx.*;
import org.xbill.DNS.*;
// Specify hostname, port and timeout
hostname = hostProps.get("system.hostname");
port = 25;
timeout = 30;
// initiate an connection to the host:port
smtp_connection = Expect.open(hostname, port, timeout);
smtp_connection.expect("220");
smtp_connection.send("quit\n");
// return with a response code
return(1);
#####################################################
Don't know how to test against each server from the collector.
Would you elaborate this hostname part please? :
Then create the DataSource which telnet to port 25 on "##HOSTNAME##" as coded.
Thanks,
Sam
Related Content
- 2 years ago
- 10 months ago
- 4 years ago