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.GraphADVAuditToJpeg

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.GraphADVAuditToJpeg('uid','filename.jpeg',height,width);

Description

The lp.GraphADVAuditToJpeg LUA function create a jpeg image file of the graph attached to an audit process.

WARNING ! The Audit should be attached to a script that generate graph generation else the function retrun nil

Parameters

‘uid’              The UID of the audit process located in the directory

'filename.jpg' The path and name of the destination jpeg file.

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

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

Use the editor wizard for selecting an UID

graph to jpeg

graph to jpeg

example of code :

i=lp.GraphADVAuditToJpeg("5136739022969765953","c:\\image1.jpg",100,300);

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

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

end

graph to jpeg

Result:

graph to jpeg

 

 


www.loriotpro.com