Ad Widget

Collapse

Telnet check without login prompt

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • daszek
    Junior Member
    • Apr 2011
    • 1

    #1

    Telnet check without login prompt

    Hi,

    My application has telnet CLI. I would like to use agent-less telnet check to access application's statistics. The problem is this CLI does not require login.

    I have defined item: TELNET agent telnet.run[]. Then zabbix server reports error straight from </src/zabbix_server/poller/checks_telnet.c> telnet_login(...) function ("No login prompt"). This function assumes there is a login prompt and checks for ':' byte (two times - for login and password). I wish that login procedure is skipped if last byte is regular prompt ($ # > %).

    Is is possible to make such change and how can it be done?
  • Gomex
    Junior Member
    Zabbix Certified Specialist
    • Apr 2009
    • 11

    #2
    Same problem

    Guys,

    I am getting the same problem here.

    I must monitor my SCO unix server through TELNET, because I can't change this server in this is the only access I have for this server.

    Comment

    • frater
      Senior Member
      • Oct 2010
      • 340

      #3
      You could write an external script for this....
      Even with login this can be done...

      You can create a script that does a login and then shows all the values you need. Then pipe them to a file on the zabbix server.....

      This script can be initiated as a zabbix external script.
      It can return a value if it was successful or not...

      that script can parse the file and send all the subsequent keys/parameters with zabbix_sender....

      Something like this.... (more a concept...)
      needs to be worked out... since I'm not on your payroll....


      /usr/local/sbin/stat_machine
      Code:
      #!/bin/sh
      SUCCESS=0
      host=$1
      (sleep 1; echo -e "admin\r"; sleep 1; echo -e "admin\r"; sleep 1; echo -e "show config\r"; sleep 1; echo -e "exit\r") | telnet $host >/tmp/$host
      
      if [ -s /tmp/$host ] ; then
        send_with_sender $host
        SUCCESS=1  
      fi
      
      echo $SUCCESS
      Last edited by frater; 17-10-2011, 14:12.
      Zabbix agents on Linux, FreeBSD, Windows, AVM-Fritz!box, DD-WRT and QNAP

      Comment

      • Zaniwoop
        Senior Member
        • Jan 2010
        • 232

        #4
        Still an issue in 2.0

        Comment

        Working...