UNPKG

oneuptime

Version:

OneUptime is a JS package that tracks error event and send logs from your applications to your oneuptime dashboard.

132 lines (107 loc) 3.29 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Source: lib/config.js</title> <script src="scripts/prettify/prettify.js"> </script> <script src="scripts/prettify/lang-css.js"> </script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> </head> <body> <div id="main"> <h1 class="page-title">Source: lib/config.js</h1> <section> <article> <pre class="prettyprint source linenums"><code>/** * @fileoverview Main application config module. * @author HackerBay, Inc. * @module config */ 'use strict'; const path = require('path'); /** The api url to send server information. */ const API_URL = process.env.API_URL || (process.env.NODE_ENV === 'development' ? 'http://localhost:3002' : 'https://oneuptime.com/api'); const onlineTestData = { cpuLoad: 10.451510774011686, avgCpuLoad: 27, cpuCores: 4, memoryUsed: 2513182720, totalMemory: 8589934592, swapUsed: 1800142848, storageUsed: 183032516608, totalStorage: 250685575168, storageUsage: 73.00999999999999, mainTemp: 59.5, maxTemp: 60, }; const degradedTestData = { cpuLoad: 11.577671931143978, avgCpuLoad: 27, cpuCores: 4, memoryUsed: 2829381632, totalMemory: 8589934592, swapUsed: 2446589952, storageUsed: 243169382400, totalStorage: 250685575168, storageUsage: 97.0017450095, mainTemp: 62, maxTemp: 63, }; const offlineTestData = { cpuLoad: 0, avgCpuLoad: 0, cpuCores: 0, memoryUsed: 0, totalMemory: 0, swapUsed: 0, storageUsed: 0, totalStorage: 0, storageUsage: 0, mainTemp: 0, maxTemp: 0, }; const LOG_PATH = { linux: { log: '/var/log/OneUptime Server Monitor/oneuptimeservermonitor.log', error: '/var/log/OneUptime Server Monitor/oneuptimeservermonitor_error.log', }, darwin: { log: '/Library/Logs/OneUptime Server Monitor/oneuptimeservermonitor.log', error: '/Library/Logs/OneUptime Server Monitor/oneuptimeservermonitor_error.log', }, win32: { log: path.join(__dirname, 'oneuptimeservermonitor.out.log'), error: path.join(__dirname, 'oneuptimeservermonitor.err.log'), }, }; module.exports = { API_URL, LOG_PATH, onlineTestData, degradedTestData, offlineTestData, }; </code></pre> </article> </section> </div> <nav> <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-api.html">api</a></li><li><a href="module-config.html">config</a></li><li><a href="module-helpers.html">helpers</a></li><li><a href="module-logger.html">logger</a></li><li><a href="module-server-monitor.html">server-monitor</a></li></ul> </nav> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Jan 08 2021 00:53:57 GMT+0100 (West Africa Standard Time) </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"> </script> </body> </html>