Ad Widget

Collapse

External Check using utility - Help with Item Protoypes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cmarotta
    Junior Member
    • Oct 2020
    • 10

    #1

    External Check using utility - Help with Item Protoypes

    Hi, I'm currently stuck on creating a working Discovery Rule, and I assume I also need a working Item Prototype. My goal is to monitor and trigger alerts based on the health of Drives discovered. In this example, there are (2x) Drives present.

    I am leveraging a utility with shell script to output the following format.

    Code:
    {
    "data" : [
    {
    "{#IPMI_SENSOR_INDEX}" : "0",
    "{#IPMI_SENSOR_EID}" : "0",
    "{#IPMI_SENSOR_VENDOR}" : "ATA",
    "{#IPMI_SENSOR_NAME}" : "INTELSSDSC2KG48",
    "{#IPMI_SENSOR_VER}" : "0121",
    "{#IPMI_SENSOR_SPEED}" : "6.0Gb/s",
    "{#IPMI_SENSOR_SIZE}" : "446GB",
    "{#IPMI_SENSOR_TEMP}" : "20C",
    "{#IPMI_SENSOR_STATUS}" : "ONLINE"
    },
    {
    "{#IPMI_SENSOR_INDEX}" : "1",
    "{#IPMI_SENSOR_EID}" : "0",
    "{#IPMI_SENSOR_VENDOR}" : "ATA",
    "{#IPMI_SENSOR_NAME}" : "INTELSSDSC2KG48",
    "{#IPMI_SENSOR_VER}" : "0121",
    "{#IPMI_SENSOR_SPEED}" : "6.0Gb/s",
    "{#IPMI_SENSOR_SIZE}" : "446GB",
    "{#IPMI_SENSOR_TEMP}" : "20C",
    "{#IPMI_SENSOR_STATUS}" : "ONLINE"
    }
    ]
    I've been experimenting with Items, Discovery Rules and Item Prototypes. So far, the only config I've gotten to capture visible data on the Host is by creating this Item under the template.


    Name SMCIPMITool Discovery
    Type External check
    Key ipmi-sensor-discovery.sh["{$HOST.IPMI.CONN}","{$HOST.IPMI.USER}","{$HOS T.IP MI.PASS}", "hdd info"]
    Type of information Text
    Update interval 1m

    The data being captured only seems to be capturing the first 6x lines of the output.
    Click image for larger version

Name:	History Data.PNG
Views:	226
Size:	32.0 KB
ID:	410860


    Is there a reason why it's not capturing the rest of the Shell script output?

    Am I taking the best approach here or is there a better way to do this?

    "{#IPMI_SENSOR_INDEX}" : "0", - This is my unique drive identifier , Drive Slot 0.
    "{#IPMI_SENSOR_STATUS}" : "ONLINE" - This is the data I'm going to try and build a Trigger Prototype around.

    Thanks for help

Working...