Ad Widget

Collapse

vpn monitoring

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Riley69
    Junior Member
    • Aug 2012
    • 17

    #1

    vpn monitoring

    Hi,

    I have a zabbix server setup on one server and a vpn server on another machine. I want to monitor whenever the vpn connection drops on the vpn server and execute a script on the vpn server to automatically restart the vpn client on it. I should also receive an alert whenever this occurs. Can someone please help me on this. (please notice the overuse of the word "on".)
  • Yello
    Senior Member
    • Apr 2011
    • 309

    #2
    Hi,
    You need to provide more information. How would determine this information manually?


    Regards,
    David

    Comment

    • Riley69
      Junior Member
      • Aug 2012
      • 17

      #3
      vpn

      Hi Yello,

      Thanks for the reply. I have a ping script on the vpn that pings the external vpn IP and a script that restarts vpn. Is it possible to run commands remotely on the vpn server and execute the scripts in that order?

      Comment

      • Yello
        Senior Member
        • Apr 2011
        • 309

        #4
        Hi,
        Yes, you can configure "UserParameter" functions which are user defined functions that the agent runs. You add them to the agent configuration.

        You'll find plenty of references to them in the forum and zabbix docs. Remember that you will probably need to trim the output to return the data type that is expected by the item configured in zabbix.


        Regards,
        David

        Comment

        • Riley69
          Junior Member
          • Aug 2012
          • 17

          #5
          vpn

          Thank you for the prompt reply. I will have a look at that

          Comment

          • mbsit
            Senior Member
            • Sep 2012
            • 130

            #6
            It is enough to use:

            Item:
            - Simple Check - icmpping[ip_address_on_the_other_side] item
            Trigger:
            - {Template ICMP All:icmpping.last(120)}=0

            Action script:
            /usr/local/share/zabbix/alertscripts/reser_vpn.sh

            -----
            reset_vpn.sh
            -----
            #!/bin/bash
            ssh login@IP_VPN_SERVER "/usr/local/bin/reser_my_vpn_server.sh"

            And set the login via SSH keys for user zabbix !

            Best
            Grzegorz
            Pozdrawiam
            Grzegorz Grabowski
            ____
            WdroĊĵenia, szkolenia, umowy serwisowe
            Warszawa - Polska

            Comment

            • Riley69
              Junior Member
              • Aug 2012
              • 17

              #7
              vpn

              Thank you Gregorz, I will test that right now

              Comment

              Working...