NetSaint Reports Docs

 

Initcfg.pl :- This script goes through the hosts.cfg file of netsaint and creates the lists needed to generate stats. I.e. Groups, Hosts, Services.

Initdatabase.pl :- This script goes though the cfg files and creates blank database files where the data will be stored at a later stage.

Check.pl :- This script goes through the netsaint.log file, outputs all the hosts and service alerts in a hosts file and a services file.

 Table.cgi :- This script generates a table by reading the data found in the database. This script is universal and can be used for all parts of the database.

 Tableold.cgi :- This script does the same as the table.cgi, except that it reads its data from the old database.

 Webpage.cgi :- This script generates the menu’s, so that one can navigate the data easily.

 Webpageold.cgi :- This script does the same as the webpage.cgi, except that it reads its data from the old database.

 Graphbar.cgi :- This script generates the bar graphs using the data read from the database.

 Graphbar.pl :- This script does the same as the graphbar.cgi, except that it reads its data from the old database.

 Graphline.cgi :- This script generates the line graphs using the data read from the database.

 Graphline.pl :- This script does the same as the graphline.cgi, except that it reads its data from the old database.

 Dbrotate.pl :- This script rotates the database so that it can be view at a later stage.

 

All done!

 

Point your web browser to http://netsaint.url.here/reports

And its that simple J

  

Theory of Operation

 

Netsaint Reports works in the following manner.

 Firstly the netsaint.log file is processed, sifting out the relevant information in to 2 separate files. These files, named Hosts and Services, contain the processed output. Secondly these files are passed through the script where the time is calculated on the up and down times of each host / service. If within the log file a duplicate entry is found, or a host / service is reported down or up more than one consecutively, it is ignored. The script calculates between the first down and first up it sees. In this first release the function of stopping the counters when it sees that NetSaint stops and starting the counters when it sees NetSaint starts again is not present and will be built in the next release. After the total time for each entry has been calculated, it is then written to a file in a database directory. This is a very basic database, where there is no need to any external database software; this may too become a reality in the releases to come. When a request has been initiated using the web interface, the data is read from its unique database file and then processed, then outputted to the screen. This is the same for the graphs, which pass the data through a graph generator and then outputted to the screen. Every month the database is moved to a backup which can be queried at any time. A new database is then re-initialised and used for processing the new data.