Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/y-u-r/nextcloud-zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md6
-rw-r--r--nextcloud.conf1
-rw-r--r--zbx_export_templates.xml523
3 files changed, 529 insertions, 1 deletions
diff --git a/README.md b/README.md
index 1b580aa..f6ad120 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,6 @@
# nextcloud-zabbix
-With this tamplate you can monitor a nextcloud via the xml file
+With this template you can monitor a nextcloud via xml file
+1. Import "zbx_export_templates.xml" to your zabbix templates
+2. change domain in nextcloud.conf file copy it to /etc/zabbix/zabbix_agentd.d/nextcloud.conf
+3. add line 'Include=/etc/zabbix/zabbix_agentd.d/nextcloud.conf' to zabbix_agentd.conf file
+4. add additional macro to your nextcloud host called "{$NCPW}" and add your api user password as value \ No newline at end of file
diff --git a/nextcloud.conf b/nextcloud.conf
new file mode 100644
index 0000000..e4f4e0c
--- /dev/null
+++ b/nextcloud.conf
@@ -0,0 +1 @@
+UserParameter=nextcloud[*],curl -s https://api:"$2"@cloud.your.domain/ocs/v2.php/apps/serverinfo/api/v1/info | grep "$1" | cut -d "<" -f 2 | cut -d ">" -f 2 | head -n 1 \ No newline at end of file
diff --git a/zbx_export_templates.xml b/zbx_export_templates.xml
new file mode 100644
index 0000000..98fd19c
--- /dev/null
+++ b/zbx_export_templates.xml
@@ -0,0 +1,523 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<zabbix_export>
+ <version>2.0</version>
+ <date>2018-02-14T13:21:30Z</date>
+ <groups>
+ <group>
+ <name>Templates</name>
+ </group>
+ </groups>
+ <templates>
+ <template>
+ <template>nextcloud xml</template>
+ <name>nextcloud xml</name>
+ <description>This Template will get the monitoring data from the nextcloud xml monitoring.</description>
+ <groups>
+ <group>
+ <name>Templates</name>
+ </group>
+ </groups>
+ <applications>
+ <application>
+ <name>nextcloud</name>
+ </application>
+ </applications>
+ <items>
+ <item>
+ <name>Active Users</name>
+ <type>0</type>
+ <snmp_community/>
+ <multiplier>0</multiplier>
+ <snmp_oid/>
+ <key>nextcloud[last5minutes,{$NCPW}]</key>
+ <delay>300</delay>
+ <history>90</history>
+ <trends>365</trends>
+ <status>0</status>
+ <value_type>3</value_type>
+ <allowed_hosts/>
+ <units/>
+ <delta>0</delta>
+ <snmpv3_contextname/>
+ <snmpv3_securityname/>
+ <snmpv3_securitylevel>0</snmpv3_securitylevel>
+ <snmpv3_authprotocol>0</snmpv3_authprotocol>
+ <snmpv3_authpassphrase/>
+ <snmpv3_privprotocol>0</snmpv3_privprotocol>
+ <snmpv3_privpassphrase/>
+ <formula>1</formula>
+ <delay_flex/>
+ <params/>
+ <ipmi_sensor/>
+ <data_type>0</data_type>
+ <authtype>0</authtype>
+ <username/>
+ <password/>
+ <publickey/>
+ <privatekey/>
+ <port/>
+ <description/>
+ <inventory_link>0</inventory_link>
+ <applications>
+ <application>
+ <name>nextcloud</name>
+ </application>
+ </applications>
+ <valuemap/>
+ <logtimefmt/>
+ </item>
+ <item>
+ <name>Nextcloud Version</name>
+ <type>0</type>
+ <snmp_community/>
+ <multiplier>0</multiplier>
+ <snmp_oid/>
+ <key>nextcloud[version,{$NCPW}]</key>
+ <delay>60480</delay>
+ <history>90</history>
+ <trends>365</trends>
+ <status>0</status>
+ <value_type>3</value_type>
+ <allowed_hosts/>
+ <units/>
+ <delta>0</delta>
+ <snmpv3_contextname/>
+ <snmpv3_securityname/>
+ <snmpv3_securitylevel>0</snmpv3_securitylevel>
+ <snmpv3_authprotocol>0</snmpv3_authprotocol>
+ <snmpv3_authpassphrase/>
+ <snmpv3_privprotocol>0</snmpv3_privprotocol>
+ <snmpv3_privpassphrase/>
+ <formula>1</formula>
+ <delay_flex/>
+ <params/>
+ <ipmi_sensor/>
+ <data_type>0</data_type>
+ <authtype>0</authtype>
+ <username/>
+ <password/>
+ <publickey/>
+ <privatekey/>
+ <port/>
+ <description/>
+ <inventory_link>0</inventory_link>
+ <applications>
+ <application>
+ <name>nextcloud</name>
+ </application>
+ </applications>
+ <valuemap/>
+ <logtimefmt/>
+ </item>
+ <item>
+ <name>Number files</name>
+ <type>0</type>
+ <snmp_community/>
+ <multiplier>0</multiplier>
+ <snmp_oid/>
+ <key>nextcloud[num_files,{$NCPW}]</key>
+ <delay>300</delay>
+ <history>90</history>
+ <trends>365</trends>
+ <status>0</status>
+ <value_type>3</value_type>
+ <allowed_hosts/>
+ <units/>
+ <delta>0</delta>
+ <snmpv3_contextname/>
+ <snmpv3_securityname/>
+ <snmpv3_securitylevel>0</snmpv3_securitylevel>
+ <snmpv3_authprotocol>0</snmpv3_authprotocol>
+ <snmpv3_authpassphrase/>
+ <snmpv3_privprotocol>0</snmpv3_privprotocol>
+ <snmpv3_privpassphrase/>
+ <formula>1</formula>
+ <delay_flex/>
+ <params/>
+ <ipmi_sensor/>
+ <data_type>0</data_type>
+ <authtype>0</authtype>
+ <username/>
+ <password/>
+ <publickey/>
+ <privatekey/>
+ <port/>
+ <description/>
+ <inventory_link>0</inventory_link>
+ <applications>
+ <application>
+ <name>nextcloud</name>
+ </application>
+ </applications>
+ <valuemap/>
+ <logtimefmt/>
+ </item>
+ <item>
+ <name>number of group shares</name>
+ <type>0</type>
+ <snmp_community/>
+ <multiplier>0</multiplier>
+ <snmp_oid/>
+ <key>nextcloud[num_shares_groups,{$NCPW}]</key>
+ <delay>300</delay>
+ <history>90</history>
+ <trends>365</trends>
+ <status>0</status>
+ <value_type>3</value_type>
+ <allowed_hosts/>
+ <units/>
+ <delta>0</delta>
+ <snmpv3_contextname/>
+ <snmpv3_securityname/>
+ <snmpv3_securitylevel>0</snmpv3_securitylevel>
+ <snmpv3_authprotocol>0</snmpv3_authprotocol>
+ <snmpv3_authpassphrase/>
+ <snmpv3_privprotocol>0</snmpv3_privprotocol>
+ <snmpv3_privpassphrase/>
+ <formula>1</formula>
+ <delay_flex/>
+ <params/>
+ <ipmi_sensor/>
+ <data_type>0</data_type>
+ <authtype>0</authtype>
+ <username/>
+ <password/>
+ <publickey/>
+ <privatekey/>
+ <port/>
+ <description/>
+ <inventory_link>0</inventory_link>
+ <applications>
+ <application>
+ <name>nextcloud</name>
+ </application>
+ </applications>
+ <valuemap/>
+ <logtimefmt/>
+ </item>
+ <item>
+ <name>number of sharred with users</name>
+ <type>0</type>
+ <snmp_community/>
+ <multiplier>0</multiplier>
+ <snmp_oid/>
+ <key>nextcloud[num_shares_user,{$NCPW}]</key>
+ <delay>300</delay>
+ <history>90</history>
+ <trends>365</trends>
+ <status>0</status>
+ <value_type>3</value_type>
+ <allowed_hosts/>
+ <units/>
+ <delta>0</delta>
+ <snmpv3_contextname/>
+ <snmpv3_securityname/>
+ <snmpv3_securitylevel>0</snmpv3_securitylevel>
+ <snmpv3_authprotocol>0</snmpv3_authprotocol>
+ <snmpv3_authpassphrase/>
+ <snmpv3_privprotocol>0</snmpv3_privprotocol>
+ <snmpv3_privpassphrase/>
+ <formula>1</formula>
+ <delay_flex/>
+ <params/>
+ <ipmi_sensor/>
+ <data_type>0</data_type>
+ <authtype>0</authtype>
+ <username/>
+ <password/>
+ <publickey/>
+ <privatekey/>
+ <port/>
+ <description/>
+ <inventory_link>0</inventory_link>
+ <applications>
+ <application>
+ <name>nextcloud</name>
+ </application>
+ </applications>
+ <valuemap/>
+ <logtimefmt/>
+ </item>
+ <item>
+ <name>Number shares</name>
+ <type>0</type>
+ <snmp_community/>
+ <multiplier>0</multiplier>
+ <snmp_oid/>
+ <key>nextcloud[num_shares,{$NCPW}]</key>
+ <delay>300</delay>
+ <history>90</history>
+ <trends>365</trends>
+ <status>0</status>
+ <value_type>3</value_type>
+ <allowed_hosts/>
+ <units/>
+ <delta>0</delta>
+ <snmpv3_contextname/>
+ <snmpv3_securityname/>
+ <snmpv3_securitylevel>0</snmpv3_securitylevel>
+ <snmpv3_authprotocol>0</snmpv3_authprotocol>
+ <snmpv3_authpassphrase/>
+ <snmpv3_privprotocol>0</snmpv3_privprotocol>
+ <snmpv3_privpassphrase/>
+ <formula>1</formula>
+ <delay_flex/>
+ <params/>
+ <ipmi_sensor/>
+ <data_type>0</data_type>
+ <authtype>0</authtype>
+ <username/>
+ <password/>
+ <publickey/>
+ <privatekey/>
+ <port/>
+ <description/>
+ <inventory_link>0</inventory_link>
+ <applications>
+ <application>
+ <name>nextcloud</name>
+ </application>
+ </applications>
+ <valuemap/>
+ <logtimefmt/>
+ </item>
+ <item>
+ <name>shares via link</name>
+ <type>0</type>
+ <snmp_community/>
+ <multiplier>0</multiplier>
+ <snmp_oid/>
+ <key>nextcloud[num_shares_link,{$NCPW}]</key>
+ <delay>300</delay>
+ <history>90</history>
+ <trends>365</trends>
+ <status>0</status>
+ <value_type>3</value_type>
+ <allowed_hosts/>
+ <units/>
+ <delta>0</delta>
+ <snmpv3_contextname/>
+ <snmpv3_securityname/>
+ <snmpv3_securitylevel>0</snmpv3_securitylevel>
+ <snmpv3_authprotocol>0</snmpv3_authprotocol>
+ <snmpv3_authpassphrase/>
+ <snmpv3_privprotocol>0</snmpv3_privprotocol>
+ <snmpv3_privpassphrase/>
+ <formula>1</formula>
+ <delay_flex/>
+ <params/>
+ <ipmi_sensor/>
+ <data_type>0</data_type>
+ <authtype>0</authtype>
+ <username/>
+ <password/>
+ <publickey/>
+ <privatekey/>
+ <port/>
+ <description/>
+ <inventory_link>0</inventory_link>
+ <applications>
+ <application>
+ <name>nextcloud</name>
+ </application>
+ </applications>
+ <valuemap/>
+ <logtimefmt/>
+ </item>
+ <item>
+ <name>shares via link with out password</name>
+ <type>0</type>
+ <snmp_community/>
+ <multiplier>0</multiplier>
+ <snmp_oid/>
+ <key>nextcloud[num_shares_link_no_password,{$NCPW}]</key>
+ <delay>300</delay>
+ <history>90</history>
+ <trends>365</trends>
+ <status>0</status>
+ <value_type>3</value_type>
+ <allowed_hosts/>
+ <units/>
+ <delta>0</delta>
+ <snmpv3_contextname/>
+ <snmpv3_securityname/>
+ <snmpv3_securitylevel>0</snmpv3_securitylevel>
+ <snmpv3_authprotocol>0</snmpv3_authprotocol>
+ <snmpv3_authpassphrase/>
+ <snmpv3_privprotocol>0</snmpv3_privprotocol>
+ <snmpv3_privpassphrase/>
+ <formula>1</formula>
+ <delay_flex/>
+ <params/>
+ <ipmi_sensor/>
+ <data_type>0</data_type>
+ <authtype>0</authtype>
+ <username/>
+ <password/>
+ <publickey/>
+ <privatekey/>
+ <port/>
+ <description/>
+ <inventory_link>0</inventory_link>
+ <applications>
+ <application>
+ <name>nextcloud</name>
+ </application>
+ </applications>
+ <valuemap/>
+ <logtimefmt/>
+ </item>
+ </items>
+ <discovery_rules/>
+ <macros/>
+ <templates/>
+ <screens/>
+ </template>
+ </templates>
+ <graphs>
+ <graph>
+ <name>Active Users</name>
+ <width>900</width>
+ <height>200</height>
+ <yaxismin>0.0000</yaxismin>
+ <yaxismax>100.0000</yaxismax>
+ <show_work_period>1</show_work_period>
+ <show_triggers>1</show_triggers>
+ <type>0</type>
+ <show_legend>1</show_legend>
+ <show_3d>0</show_3d>
+ <percent_left>0.0000</percent_left>
+ <percent_right>0.0000</percent_right>
+ <ymin_type_1>0</ymin_type_1>
+ <ymax_type_1>0</ymax_type_1>
+ <ymin_item_1>0</ymin_item_1>
+ <ymax_item_1>0</ymax_item_1>
+ <graph_items>
+ <graph_item>
+ <sortorder>0</sortorder>
+ <drawtype>0</drawtype>
+ <color>00C800</color>
+ <yaxisside>0</yaxisside>
+ <calc_fnc>2</calc_fnc>
+ <type>0</type>
+ <item>
+ <host>nextcloud xml</host>
+ <key>nextcloud[last5minutes,{$NCPW}]</key>
+ </item>
+ </graph_item>
+ </graph_items>
+ </graph>
+ <graph>
+ <name>Number files</name>
+ <width>900</width>
+ <height>200</height>
+ <yaxismin>0.0000</yaxismin>
+ <yaxismax>100.0000</yaxismax>
+ <show_work_period>1</show_work_period>
+ <show_triggers>1</show_triggers>
+ <type>0</type>
+ <show_legend>1</show_legend>
+ <show_3d>0</show_3d>
+ <percent_left>0.0000</percent_left>
+ <percent_right>0.0000</percent_right>
+ <ymin_type_1>0</ymin_type_1>
+ <ymax_type_1>0</ymax_type_1>
+ <ymin_item_1>0</ymin_item_1>
+ <ymax_item_1>0</ymax_item_1>
+ <graph_items>
+ <graph_item>
+ <sortorder>0</sortorder>
+ <drawtype>0</drawtype>
+ <color>00C800</color>
+ <yaxisside>0</yaxisside>
+ <calc_fnc>2</calc_fnc>
+ <type>0</type>
+ <item>
+ <host>nextcloud xml</host>
+ <key>nextcloud[num_files,{$NCPW}]</key>
+ </item>
+ </graph_item>
+ </graph_items>
+ </graph>
+ <graph>
+ <name>share statistics</name>
+ <width>900</width>
+ <height>200</height>
+ <yaxismin>0.0000</yaxismin>
+ <yaxismax>100.0000</yaxismax>
+ <show_work_period>1</show_work_period>
+ <show_triggers>1</show_triggers>
+ <type>0</type>
+ <show_legend>1</show_legend>
+ <show_3d>0</show_3d>
+ <percent_left>0.0000</percent_left>
+ <percent_right>0.0000</percent_right>
+ <ymin_type_1>0</ymin_type_1>
+ <ymax_type_1>0</ymax_type_1>
+ <ymin_item_1>0</ymin_item_1>
+ <ymax_item_1>0</ymax_item_1>
+ <graph_items>
+ <graph_item>
+ <sortorder>0</sortorder>
+ <drawtype>0</drawtype>
+ <color>C80000</color>
+ <yaxisside>0</yaxisside>
+ <calc_fnc>2</calc_fnc>
+ <type>0</type>
+ <item>
+ <host>nextcloud xml</host>
+ <key>nextcloud[num_shares,{$NCPW}]</key>
+ </item>
+ </graph_item>
+ <graph_item>
+ <sortorder>1</sortorder>
+ <drawtype>0</drawtype>
+ <color>0000C8</color>
+ <yaxisside>0</yaxisside>
+ <calc_fnc>2</calc_fnc>
+ <type>0</type>
+ <item>
+ <host>nextcloud xml</host>
+ <key>nextcloud[num_shares_groups,{$NCPW}]</key>
+ </item>
+ </graph_item>
+ <graph_item>
+ <sortorder>2</sortorder>
+ <drawtype>0</drawtype>
+ <color>C800C8</color>
+ <yaxisside>0</yaxisside>
+ <calc_fnc>2</calc_fnc>
+ <type>0</type>
+ <item>
+ <host>nextcloud xml</host>
+ <key>nextcloud[num_shares_user,{$NCPW}]</key>
+ </item>
+ </graph_item>
+ <graph_item>
+ <sortorder>3</sortorder>
+ <drawtype>0</drawtype>
+ <color>00C8C8</color>
+ <yaxisside>0</yaxisside>
+ <calc_fnc>2</calc_fnc>
+ <type>0</type>
+ <item>
+ <host>nextcloud xml</host>
+ <key>nextcloud[num_shares_link,{$NCPW}]</key>
+ </item>
+ </graph_item>
+ <graph_item>
+ <sortorder>4</sortorder>
+ <drawtype>0</drawtype>
+ <color>C8C800</color>
+ <yaxisside>0</yaxisside>
+ <calc_fnc>2</calc_fnc>
+ <type>0</type>
+ <item>
+ <host>nextcloud xml</host>
+ <key>nextcloud[num_shares_link_no_password,{$NCPW}]</key>
+ </item>
+ </graph_item>
+ </graph_items>
+ </graph>
+ </graphs>
+</zabbix_export>