Several tools to monitor Dinstar gateways
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Dinstar utilities

Dinstar equipment doesn't offer you any kind of monitoring tool apart from the web management page. Although there is a telnet interface which you can, somehow, automate to give you information, this job is rather an obstacle than a solution.

With the scripts on this repository, you can setup a basic monitoring system using an intermediate database and a screen scrapping script which connects to the webmin page of every gateway you want and writes down the parsed html information to a database which you can consult later using whatever tool you prefer.

The tool I preferred was Nagios, but it doesn't work all by itself so I wrote another four scripts to take care of the ASR, PDD, Time Limit and port signal captured all by the main script.

You can, however, choose to ignore the Nagios scripts since they are completely independent one from another.


  1. perl
  2. curl
  3. crond (optional)

Installation and configuration

  1. Clone the repository
  2. setup the database connection
    # mysql 
    mysql> create database dinstar;

    # mysql dinstar < sql/dinstar.sql
  1. Edit file with your database credentials
    use constant DB         => 'dinstar';
    use constant USER       => 'root';
    use constant PWD        => '';
    use constant HOST       => 'localhost';
  1. Test the script execution
    Usage: <ip> <user> <password> <number-of-ports>

    # perl admin admin 8
  1. Get to your database client and check if the rows were inserted properly
    select * from port;


  1. If you want to constantly check for updates, you can put the script in a crontab to run every 5 minutes or so.
    */5 * * * * perl /root/dinstar-util/ admin admin 8

Nagios installation

  1. Put the scripts in the plugins directory
  2. Setup the new commands in the command.cfg file using the parameters you want.

    define command{
        command_name    check-dinstar-limit
        command_line    $USER1$/check-dinstar-limit -h$HOSTADDRESS$ -w30 -c15
  1. Setup a new checking in your service.cfg file
  2. Restart nagios

I don't want to get into much detail on Nagios configuration since there are plenty of material out there to setup plugins. If you are willing to use these scripts I'm pretty sure you alrealy know how to use and configure Nagios ;)