[ {iot, [ {http_server, [ {port, 18080}, {acceptors, 500}, {max_connections, 10240}, {backlog, 10240} ]}, {udp_server, [ {port, 18080} ]}, %% 数据的最大缓存量 {device_cache_size, 200}, %% 事件的间隔处理逻辑 {ai_event_throttle, #{ 15 => 300 }}, {api_url, "http://39.98.184.67:8800"}, {watchdog, [ {pri_key, "jinzhi_watchdog_pri.key"}, {url, "http://172.30.37.242:8080/hqtaskcenterapp/sys/taskCenter/taskReceive/sendNotice.do"}, {users, ["S20232026", "S20232321", "S20232323"]}, {report_interval, 43200}, {guard_items, [ {cpu_temperature, 60}, {disk_used_percentage, 80}, {memory_used_percentage, 80} ]} ]}, %% 目标服务器地址 {emqx_server, [ {host, {39, 98, 184, 67}}, {port, 1883}, {tcp_opts, []}, {username, "test"}, {password, "test1234"}, {keepalive, 86400}, {retry_interval, 5} ]}, %% 权限检验时的预埋token {pre_tokens, [ {<<"test">>, <<"iot2023">>} ]}, %% 配置中电的数据转发, mqtt协议 {zhongdian, [ {host, "39.98.184.67"}, {port, 1883}, {username, "test"}, {password, "test1234"}, {topic, "CET/NX/upload"}, {qos, 2} ]}, %% 配置实验室电表的数据转发, mqtt协议 {school_lab, [ {host, "39.98.184.67"}, {port, 1883}, {username, "test"}, {password, "test1234"}, {topic, "CET/NX/upload"}, {qos, 2} ]}, %% 金智调度系统 {jinzhi, [ {pri_key, "jinzhi_pri.key"}, {url, "http://172.30.6.177:9080/device/push"}, {pool_size, 10} ]}, %% influxdb数据库配置, 测试环境的: 用户名: iot; password: password1234 {influx_pool, [ {pool_size, 100}, {worker_args, [ {host, "39.98.184.67"}, {port, 8086}, {token, <<"IUQ04qecTie7LSuX1EDFBeqspClOdoRBfmXDQxhoEjiJFeW8M-Ui66t981YvviI5qOBpf_ZLgJlBx7nid2lyJQ==">>} ]} ]}, %% 智慧监控平台 {donghuoliren, [ {url, "https://xsdc.njau.edu.cn/hq-cyaqjg/rest/rgkSmart/push"}, {token, <<"aB3$dEfGhiJkLmNoPqRsTuVwXyZ!@#4f5e6d7c8b9a0f1e2d">>}, {locations, [ {"0516103021011022700001", "诚苑餐厅一楼1F"}, {"0516103021011022700002", "诚苑餐厅一楼1F"} ]} ]}, {pools, [ %% mysql连接池配置 {mysql_iot, [{size, 10}, {max_overflow, 20}, {worker_module, mysql}], [ {host, {39, 98, 184, 67}}, {port, 3306}, {user, "nannonguser"}, {connect_mode, synchronous}, {keep_alive, true}, {password, "nannong@Fe7w"}, {database, "nannong"}, {queries, [<<"set names utf8">>]} ] }, %% redis连接池 {redis_pool, [{size, 10}, {max_overflow, 20}, {worker_module, eredis}], [ {host, "39.98.184.67"}, {port, 26379}, {database, 1} ] } ]} ]}, %% 系统日志配置,系统日志为lager, 支持日志按日期自动分割 {lager, [ {colored, true}, %% Whether to write a crash log, and where. Undefined means no crash logger. {crash_log, "trade_hub.crash.log"}, %% Maximum size in bytes of events in the crash log - defaults to 65536 {crash_log_msg_size, 65536}, %% Maximum size of the crash log in bytes, before its rotated, set %% to 0 to disable rotation - default is 0 {crash_log_size, 10485760}, %% What time to rotate the crash log - default is no time %% rotation. See the README for a description of this format. {crash_log_date, "$D0"}, %% Number of rotated crash logs to keep, 0 means keep only the %% current one - default is 0 {crash_log_count, 5}, %% Whether to redirect error_logger messages into lager - defaults to true {error_logger_redirect, true}, %% How big the gen_event mailbox can get before it is switched into sync mode {async_threshold, 20}, %% Switch back to async mode, when gen_event mailbox size decrease from `async_threshold' %% to async_threshold - async_threshold_window {async_threshold_window, 5}, {handlers, [ %% debug | info | warning | error, 日志级别 {lager_console_backend, debug}, {lager_file_backend, [{file, "debug.log"}, {level, debug}, {size, 314572800}]}, {lager_file_backend, [{file, "notice.log"}, {level, notice}, {size, 314572800}]}, {lager_file_backend, [{file, "error.log"}, {level, error}, {size, 314572800}]}, {lager_file_backend, [{file, "info.log"}, {level, info}, {size, 314572800}]} ]} ]} ].