Sunny

Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Sunny

  • Rank
    Community Member
  1. 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
  2. Hi Mike, Thank you for your reply. Yes, I'm looking to do this : "CollectorA would telnet to Server1 and Server2, CollectorB would telnet to Server3, CollectorC would telnet to Server4 and CollectorD would telnet to Server5". Would you direct me how to do that? Looking forward to your reply. Thanks, Sam
  3. Hi Everyone, I was referring to : https://www.logicmonitor.com/support/terminology-syntax/scripting-support/groovyexpect-text-based-interaction/ and there it's written a groovy script example which describes "Telnet/Port Connectivity: Test FTP Server Availability". However, I'm specifically looking to telnet to multiple hosts over port 25 from different devices. For e.g.: let's create a DS, then in the devices [I'm going to add a multiple collectors from where I want to telnet to multiple hosts] and then the groovy script will execute and telnet to over port 25 from each of the separate collector to the specific hosts. Not sure how would I achieve this? Any interesting idea/suggestion/reference would be happy to listen? Thanks, Sam