Forum Discussion

Gopimiriyala_HC's avatar
2 months ago

Cisco Switch Disk Space Monitoring

Kindly help with data source which can monitor the cisco switch disk space monitoring

2 Replies

  • Thank You Stuart, I have searched Exchange and Google and i am unable to find any DS which can help me to solve the issue, I will follow as suggested. 

    Keep posting the update. 

    Thank you,

    Gopi M

  • Have you looked in the exchange and Google?

    Failing that, the first question to ask is how would you get the information manually? You'd probably login to the device via ssh, execute a command, then use the output from that command right? 

    Ok, then you'll need to write a Groovy script to mimic that behavior. Log into the device, execute the command, parse the output.

    You'll need two scripts, one for the discovery another for the collection. For discovery, the goal is to identify the objects you want to monitor. Each needs at least an ID and a name. They can be the same. The output of your script (using println() statements) should look like this:

    sda1##Disk 1 (sda1)
    sdb1##Disk 2 (sda2)

    Your collection would then do the same thing but parse the response and output the data itself. The output (using println() statements) should look like this: 25
    sda1.capacity: 300 5
    sda2.capacity: 38

    Then your datapoints in your datasource would be free and capacity (or others depending on what's available in the response to your command). You'd use key-value pairs to define the datapoint and use and ##WILDVALUE##.capacity as the keys.

    There are a few libraries you can use to open an SSH session and execute a command: Expect, JSCH, and schmizz.sshj (as found in the Common Config Sources).

    More examples and documentation here.