LUALoriotPro WEB site

LoriotPro scripting documentation
Extensions for LUA language

Table of contents Search function

Print the current page Mail this  link UTUBE Channel version française

lp.GraphIPPollingToJpeg

LoriotPro has extended the LUA sripting language by providing its own LUA libraries. The new functions provided are dedicated to the creation of monitoring and SNMP automation application.

Syntax

value = lp.GraphIPPollingToJpeg('ip','filename.jpg','title',height,width);

Description

The lp.GraphIPPollingToJpeg LUA function creates a jpeg image file of the IP or SNMP polling response time of a host.

Parameters

‘ip’             The IP address of a host loacted in the directory

'filename.jpg'  The path and name of the graph file

Warning  ! If you use the '\' in the path you must replace it with '\\'. The '\'character is use as an escape character in LUA.

title The title of the graph

height        The height of the generated image

width          The width of the generated image

Return Values

value : equal 1 if a file has been generated

Return nil if an error occurs

Example

polling response time

polling response time

The code

i=lp.GraphIPPollingToJpeg("127.0.0.1","c:\\image1.jpg","mytitle",200,600);

if (i) then lp.Print("File generated\n");

else lp.Print("File no generated\n");

end

polling response time

View of the result image.

polling response time

 

 


www.loriotpro.com